Last updated on 23rd March 2026

View a single SSH command via API

This method will return a single SSH command configured for your project.

Tip: You can explore and test this endpoint interactively using our OpenAPI documentation.

URL

/projects/<project>/commands/<identifier>
  • Replace <project> with either the permalink or identifier of the project.
  • Replace <identifier> with the identifier of the command.

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/077d1933-ba80-afaa-3a89-b8c306a4a6df

Example Response

{
    "identifier": "077d1933-ba80-afaa-3a89-b8c306a4a6df",
    "cback": "before_changes",
    "position": 1,
    "description": "Command description",
    "command": "echo deploy;",
    "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",
    "timeout": 300,
    "enabled": true
}