Header

List all deployments via API

This method will return a list of all deployments in a project; all results to this URL are paginated with 10 deployments per page.

URL

/projects/<project>/deployments

Replace <project> with the permalink of the project.

HTTP Method

GET

Supported Parameters

  • page - The page number you want to view
  • to - The UUID of the server or server group you want to see deployments for

Example cURL Request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
https://atech.deployhq.com/projects/react-project/deployments

Example Response

{
  "pagination":
    {
      "current_page":1,
      "total_pages":1,
      "offset":0,
      "total_records":1
    },
   "records":[{
   "identifier": "b5d0d157-674c-4bdd-ac7b-89ae83a9c275",
   "servers": 
   [      
      {
         "id": 521731,
         "identifier": "4e22d4c9-2066-f26a-200d-dbcb51690512",
         "name": "Test FTP Server",
         "protocol_type": "ftp",
         "server_path": "htdocs",
         "last_revision": "baa7690059283c6e2e3d21fd0149f12b318175dd",
         "preferred_branch": "master",
         "branch": "",
         "notify_email": "",
         "server_group_identifier": null,
         "hostname": "hostname",
         "username": "username",
         "port": "21",
         "passive": true,
         "force_hidden_files": false
      }
   ],
   "project": 
   {
      "name": "React Project",
      "permalink": "react-project",
      "public_key": "ssh-rsa xxxxxxxxxxxxxx DeployHQ.com Key for react-project",
      "repository": 
      {
         "scm_type": "git",
         "url": "https://github.com/robertlyall/my-react-project.git",
         "port": null,
         "username": "",
         "branch": "master",
         "cached": true,
         "hosting_service": 
         {
            "name": "GitHub",
            "url": "http://github.com",
            "tree_url": "https://github.com/robertlyall/my-react-project/tree/master",
            "commits_url": "https://github.com/robertlyall/my-react-project/commits/master"
         }
      }
   },
   "deployer": "Robert Lyall",
   "deployer_avatar": "https://avatar-url",
   "branch": "master",
   "start_revision": 
   {
      "ref": "baa7690059283c6e2e3d21fd0149f12b318175dd",
      "author": "Robert Lyall",
      "email": "rob@atechmedia.com",
      "timestamp": "2017-09-05T17:08:34.000+01:00",
      "message": "Change the title",
      "short_message": "Change the title",
      "tags": []
   },
   "end_revision": 
   {
      "ref": "baa7690059283c6e2e3d21fd0149f12b318175dd",
      "author": "Robert Lyall",
      "email": "robert.g.lyall@gmail.com",
      "timestamp": "2017-09-05T17:08:34.000+01:00",
      "message": "Change the title",
      "short_message": "Change the title",
      "tags": []
   },
   "status": "completed",
   "timestamps": 
   {
      "queued_at": "2018-01-05T15:31:47.000+00:00",
      "started_at": "2018-01-05T15:31:48.000+00:00",
      "completed_at": "2018-01-05T15:33:57.000+00:00",
      "duration": null
   },
   "files": 
   {
      "4e22d4c9-2066-f26a-200d-dbcb51690512": 
      {
         "changed": [],
         "removed": []
      }
   },
   "configuration": 
   {
      "copy_config_files": true,
      "notification_addresses": null
   },
   "legacy": false,
   "steps": 
   [      
      {
         "step": "waiting_for_capacity",
         "stage": "preparing",
         "identifier": "706d2e96-8439-4c6f-b7b6-8e237905751c",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Waiting for an available deployment slot",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "preflight_checks",
         "stage": "preparing",
         "identifier": "b575bff2-a1a1-4531-8709-bb557b5a32eb",
         "server": null,
         "total_items": 3,
         "completed_items": 3,
         "description": "Performing pre-deployment checks",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "repo_preparation",
         "stage": "preparing",
         "identifier": "611aeb39-b103-45d5-8fe3-4e27a99b1944",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Preparing repository for deployment",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "repo_checkout",
         "stage": "building",
         "identifier": "0e079c6c-00a1-4f1d-bf86-fb06d4b633ab",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Checking out repository for deployment",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "prepare_environment",
         "stage": "building",
         "identifier": "ac621365-f8d5-4b27-82f7-1c32d0a49f05",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Setting up environment for build commands",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "run_build_command",
         "stage": "building",
         "identifier": "bbf27671-c180-4828-997d-53b28316c6bb",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Running build command \"Sass Gem\"",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "run_build_command",
         "stage": "building",
         "identifier": "bd615403-ad13-4f05-bde3-f7dee5a5ae79",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Running build command \"Install\"",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "run_build_command",
         "stage": "building",
         "identifier": "93971f4a-025f-475b-89af-c213dcc609ab",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Running build command \"Build\"",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "run_build_command",
         "stage": "building",
         "identifier": "011bb271-fb52-4738-83de-a38c919d1434",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Running build command \"Remove\"",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "run_build_command",
         "stage": "building",
         "identifier": "83c9856a-3e60-4918-9c44-fbf37db149b0",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Running build command \"DM\"",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "receive_built_files",
         "stage": "building",
         "identifier": "953ea4c0-a797-4d6f-9fc3-4a1a0399e49a",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Receiving built files",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "generate_manifest",
         "stage": "building",
         "identifier": "da8eb7cb-b68e-4c47-9794-2e19d6a501da",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Generating deployment manifest",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "connecting",
         "stage": "transferring",
         "identifier": "e4550700-ce4f-45ff-80b0-31db7680c65c",
         "server": 521731,
         "total_items": null,
         "completed_items": null,
         "description": "Connecting to server",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "transfer_files",
         "stage": "transferring",
         "identifier": "53b01afd-3c36-4acc-96b9-7fa968aa1f98",
         "server": 521731,
         "total_items": 10,
         "completed_items": 10,
         "description": "Transferring files",
         "status": "completed",
         "logs": true
      },      
      {
         "step": "upload_config_files",
         "stage": "transferring",
         "identifier": "1dc1a4e1-ea4d-4a33-9219-cb097f1cae9f",
         "server": 521731,
         "total_items": 0,
         "completed_items": null,
         "description": "Uploading config files",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "send_webhooks",
         "stage": "finishing",
         "identifier": "1a08853f-0e43-4583-b818-7645f3653011",
         "server": null,
         "total_items": 0,
         "completed_items": null,
         "description": "Delivering webhook notifications",
         "status": "completed",
         "logs": false
      },      
      {
         "step": "send_emails",
         "stage": "finishing",
         "identifier": "ad274b62-5602-4eaa-bbc8-548cd388dbf3",
         "server": null,
         "total_items": null,
         "completed_items": null,
         "description": "Sending emails",
         "status": "completed",
         "logs": false
      }
   ]
  }]
}
Tree

Proudly powered by Katapult. Running on 100% renewable energy.