Header

Create a server group

This method allows you to create a server group using the API.

URL

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

HTTP Method

POST

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, either true or false (required)
  • email_notify_on - When do you want to receive email notifications, either never, failure or always (required)
  • notification_email - An email address to send notifications to
  • transfer_order - The transfer order for the server group, parallel or sequential (required)

Example cURL request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-X POST \
-d { \
    "server_group":{ \
      "name":"Created via the API",
      "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

Example response

{
  "identifier":"983f6f1b-0d8b-4860-ad44-3cc4890a0097",
  "name":"Created via the API",
  "servers":[],
  "preferred_branch":"master",
  "last_revision":null
}