Edit a server group via API
This method allows you to update a server group using the API.
URL
/projects/<project>/server_groups/<identifier>
- Replace
<project>with either thepermalinkoridentifierof the project. - Replace
<identifier>with the identifier of the server group.
HTTP Method
PUT
Supported Parameters
branch- The branch you wish to deploy this server group from (required)name- A description or name for the server group (required)auto_deploy- Should auto deployments be enabled, eithertrueorfalse(required)email_notify_on- When do you want to receive email notifications, eithernever,failureoralways(required)notification_email- An email address to send notifications totransfer_order- The transfer order for the server group,parallelorsequential(required)
Example cURL request
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-X PUT \
-d { \
"server_group":{ \
"name":"Created via the API (edited)", \
"branch":"master", \
"auto_deploy":true, \
"email_notify_on":"failure", \
"notification_email":"adamw@atech.media", \
"transfer_order":"parallel" \
} \
} \
https://atech.deployhq.com/projects/atomic-deployment-test/server_groups/983f6f1b-0d8b-4860-ad44-3cc4890a0097
Example response
{
"identifier":"983f6f1b-0d8b-4860-ad44-3cc4890a0097",
"name":"Created via the API (edited)",
"servers":[],
"preferred_branch":"master",
"last_revision":null
}