Header

Listing all SSH commands

This method will return a list of all the commands which are configured for your account.

URL

/projects/<project>/commands

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/commands

Example Response

[
  {
    "identifier": "077d1933-ba80-afaa-3a89-b8c306a4a6df",
    "cback": "before_changes",
    "position": 1,
    "description": "Command description",
    "command": "**command**",
    "halt_on_error": true,
    "servers": [
    {
      "identifier": "16d48756-20f0-1fa0-ac12-9dffb67054c0",
      "name": "Development Server",
      "protocol_type": "ssh",
      "server_path": "/home/deploy",
      "auto_deploy_url": "https://test.deployhq.com/deploy/codebase/to/development-server/fnxn0be32syo",
      "last_revision": "2aab5da1a6ae04a1e943d55213465d28056d5bc2",
      "preferred_branch": "master",
      "notify_email": false,
      "server_group_identifier": null,
      "hostname": "127.0.0.1",
      "port": 22,
      "username": "deploy",
      "use_ssh_keys": false,
      "host_key": "AAAAB3NzaC1yc2EAAAA....."
    }
    ],
    "timing": "all"
  }
]