Edit an existing build command via API (templates)
This method allows you to edit an existing build command within a template.
URL
/templates/<permalink>/build_commands/<identifier>
- Replace
<permalink>
with the permalink of the template. - Replace
<identifier>
with the identifier of the build command
HTTP Method
PUT
Supported Parameters
description
- a description of your build commandcommand
- the command that you wish to runhalt_on_error
- eithertrue
orfalse
, 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/templates/api-created/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":"Template",
"parent_id":8533,
"template_name":null
}