Header

Edit an existing build command

This method allows you to edit an existing build command within a template.

URL

/projects/<permalink>/build_commands/<identifier>
  • Replace <permalink> with the permalink of the project.
  • Replace <identifier> with the identifier of the build command

HTTP METHOD

PUT

Supported Parameters

  • description - a description of your build command
  • command - the command that you wish to run
  • halt_on_error - either true or false, if you wish for DeployHQ to halt the deployment if the command fails

Example cURL request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-X POST \
-d '{ \
 "build_command":{ \ 
   "description":"Created via the API (edited)", \
   "command":"test\ntest", \
   "halt_on_error":true \
  } \
}' \
https://atech.deployhq.com/projects/atomic-deployment-test/build_commands/d89fd915-545b-473e-b986-5c4a0156ec72

Example response

{
  "id":20998,
  "project_id":null,
  "description":"Created via the API (edited)",
  "command":"test\ntest",
  "halt_on_error":true,
  "position":1,
  "created_at":"2019-07-08T16:54:02.000+01:00",
  "updated_at":"2019-07-08T17:05:42.000+01:00",
  "identifier":"d89fd915-545b-473e-b986-5c4a0156ec72",
  "parent_type":"Project",
  "parent_id":350494,
  "template_name":null
}