Header

Create a build command

This method allows you to add a new build command to an existing template.

URL

/templates/<permalink>/build_commands
  • Replace <permalink> with the permalink of your template.

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 (edited)", \
   "command":"test\ntest", \
   "halt_on_error":true \
  } \
}' \
https://atech.deployhq.com/templates/api-created/build_commands

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-08T16:54:02.000+01:00",
  "identifier":"d89fd915-545b-473e-b986-5c4a0156ec72",
  "parent_type":"Template",
  "parent_id":8533,
  "template_name":null
}

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