Edit a server group via API (templates)
This method allows you to update a server group within a template using the API.
URL
/templates/<permalink>/server_groups/<identifier>
- Replace
<permalink>
with the permalink of the template. - Replace
<identifier>
with the identifier of the server group.
HTTP Method
PUT
Supported Parameters
name
- A description or name for the server group (required)auto_deploy
- Should auto deployments be enabled, eithertrue
orfalse
(required)email_notify_on
- When do you want to receive email notifications, eithernever
,failure
oralways
(required)notification_email
- An email address to send notifications totransfer_order
- The transfer order for the server group,parallel
orsequential
(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", \
"auto_deploy":true, \
"email_notify_on":"failure", \
"notification_email":"adamw@atech.media", \
"transfer_order":"parallel" \
} \
} \
https://atech.deployhq.com/templates/api-created/server_groups/4e62a8fd-8708-466b-b79f-59365c31e0d1
Example response
{
"identifier":"4e62a8fd-8708-466b-b79f-59365c31e0d1",
"name":"Created via the API",
"servers":[],
"preferred_branch":null,
"last_revision":null
}