Listing all servers via API
This method will return a list of all servers which are configured for your project.
URL
/projects/<project>/servers
Replace <project>
with the permalink
of the project.
HTTP Method
GET
Supported Parameters
None
Example cURL request
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
https://test.deployhq.com/projects/project/servers
Example JSON
[
{
"identifier": "b68b6f98-abec-4c6a-830b-aadc62b2ecc7",
"name": "Production",
"protocol_type": "ssh",
"server_path": "/tmp",
"auto_deploy_url": "https://deploy.deployhq.com/deploy/server/to/production/jjp6zwwjbo9x",
"last_revision": null,
"preferred_branch": "devel",
"notify_email": false,
"server_group_identifier": null,
"hostname": "127.0.0.1",
"port": "22",
"username": "root",
"use_ssh_keys": true,
"host_key": "....",
"auto_deploy": false
},
{
"identifier": "b68b6f98-abec-4c6a-830b-aadc62b2ecc7",
"name": "Production",
"protocol_type": "ssh",
"server_path": "/tmp",
"auto_deploy_url": "https://deploy.deployhq.com/deploy/server/to/production/jjp6zwwjbo9x",
"last_revision": null,
"preferred_branch": "devel",
"notify_email": false,
"server_group_identifier": null,
"hostname": "127.0.0.1",
"port": "22",
"username": "root",
"use_ssh_keys": true,
"host_key": "....",
"auto_deploy": true
"environment": "staging"
}
]