The Servers API allows you to access the servers existing on your account.
curl "https://yoursubdomain.deploybot.com/api/v1/servers/42" \
-X GET \
-H "X-Api-Token: api-token"
id | integer | ID of server |
---|---|---|
name | string | Name of server |
protocol | string | Server protocol, one of the following values: ftp, sftp, shell, dreamobjects, heroku, s3, cloud_files, digital_ocean, shopify, elastic_beanstalk, atomic, atomic_digital_ocean |
repository_id | integer | ID of repository |
environment_id | integer | ID of environment |
pre_deploy_hook | string | Webhook URL to hit before deployment |
post_deploy_hook | string | Webhook URL to hit after deployment |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1,
"name": "ftp.example.org",
"protocol": "ftp",
"repository_id": 1,
"environment_id": 1,
"pre_deploy_hook": "http://example.org/webhook?stage=pre",
"post_deploy_hook": "http://example.org/webhook?stage=post",
"created_at": "2015/02/24 15:26:37 +0000",
"updated_at": "2015/03/11 20:49:54 +0000"
}
repository_id | ID of repository to filter results by |
---|---|
environment_id | ID of environment to filter results by |
limit | Max number of servers to return per request (default 50, max 50) |
after | ID of last server returned by previous request. Used for paging results. |
curl "https://yoursubdomain.deploybot.com/api/v1/servers?limit=2&after=42" \
-X GET \
-H "X-Api-Token: api-token"
meta | object | |
---|---|---|
meta/next | integer | Next page’s after parameter’s value |
meta/next_uri | string | Next page’s URI when the query results do not fit on a single page |
meta/total | integer | Total number of servers |
entries | array | List of servers matching the query |
entries/id | integer | ID of server |
entries/name | string | Name of server |
entries/protocol | string | Server protocol, one of the following values: ftp, sftp, shell, dreamobjects, heroku, s3, cloud_files, digital_ocean, shopify, elastic_beanstalk, atomic, atomic_digital_ocean |
entries/repository_id | integer | ID of repository |
entries/environment_id | integer | ID of environment |
entries/pre_deploy_hook | string | Webhook URL to hit before deployment |
entries/post_deploy_hook | string | Webhook URL to hit after deployment |
entries/created_at | string | Creation timestamp |
entries/updated_at | string | Last update timestamp |
HTTP/1.1 200 OK
Content-Type: application/json
{
"meta": {
"next": 48,
"next_uri": "/servers?after=48&limit=2",
"total": 3
},
"entries": ,
"id": 43,
"name": "/servers?after=48&limit=2",
"protocol": "ftp",
"repository_id": 1,
"environment_id": 1,
"pre_deploy_hook": "http://example.org/webhook?stage=pre",
"post_deploy_hook": "http://example.org/webhook?stage=post",
"created_at": "2015/02/24 15:26:37 +0000",
"updated_at": "2015/03/11 20:49:54 +0000"
}