Header

Create a new build command

This method allows you to create a new build command.

URL

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

HTTP Method

POST

Supported Parameters

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

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", \
   "command":"test\ntest", \
   "halt_on_error":true \
  } \
}' \
https://atech.deployhq.com/projects/atomic-deployment-test/build_commands

Example response

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

Proudly powered by Katapult. Running on 100% renewable energy.