Header

View a config file deployment preview via API

This method will return data about a config file deployment preview.

As the deployment only included config files, it will have some key differences from a standard deployment, such as the branch, start_revision and end_revision being null.

URL

[ACCOUNT_PERMALINK].deployhq.com/projects/[PROJECT_PERMALINK]/deployments/[DEPLOYMENT_ID]/preview

Replace <project> with the permalink of the project.

HTTP Method

GET 

Example output

{
  "identifier": "2b45107e-0775-4084-93e5-d655f1558047",
  "servers": [
    {
      "id": 1519233,
      "identifier": "68180695-e71f-4c09-afba-d0cc87b8e39b",
      "name": "Server-endpoint",
      "protocol_type": "ssh",
      "server_path": "/home/ubuntu/www",
      "last_revision": "0f236d2574dc51234b5365f083495bb966d4e943",
      "preferred_branch": "main",
      "branch": "",
      "notify_email": "",
      "server_group_identifier": "72afe1be-359e-4aef-b851-a1107c162e2b",
      "auto_deploy": false,
      "environment": "",
      "hostname": "123.123.123.123",
      "username": "ubuntu",
      "port": "22",
      "use_ssh_keys": true,
      "host_key": "[HOST_KEY]",
      "unlink_before_upload": false
    }
  ],
  "project": {
     [...]
  },
  "deployer": "Viktor",
  "branch": null,
  "start_revision": {
    "ref": null
  },
  "end_revision": {
    "ref": null
  },
  "status": "preview_ready",
  "timestamps": {
    "queued_at": "2024-09-27T11:42:01.000+02:00",
    "started_at": null,
    "completed_at": null,
    "duration": null,
    "runs_at": null
  },
  "files": {
    "68180695-e71f-4c09-afba-d0cc87b8e39b": {
      "changed": [],
      "removed": []
    }
  },
  "configuration": {
    "copy_config_files": true,
    "notification_addresses": null,
    "skip_project_files": true
  },
  "legacy": false,
  "deferred": false,
  "config_files_deployment": true,
  "steps": [
    {
      "step": "waiting_for_capacity",
      "stage": "preparing",
      "identifier": "0ed7a4e4-2d72-46b8-907b-c4fa19546da1",
      "server": null,
      "total_items": null,
      "completed_items": null,
      "description": "Waiting for an available deployment slot",
      "status": "running",
      "logs": true,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "preflight_checks",
      "stage": "preparing",
      "identifier": "c9fbdef0-b4a8-4d5f-8dca-0860ccaeb515",
      "server": null,
      "total_items": 3,
      "completed_items": null,
      "description": "Performing pre-deployment checks",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "transfer_files",
      "stage": "transferring",
      "identifier": "bcefe7f1-9040-4d2f-9181-1cb388edfb3a",
      "server": 1519233,
      "total_items": null,
      "completed_items": null,
      "description": "Transferring changed files",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "upload_config_files",
      "stage": "transferring",
      "identifier": "832b87a7-a0c3-4bac-8601-f4a06e7be9c4",
      "server": 1519233,
      "total_items": 1,
      "completed_items": null,
      "description": "Uploading config files",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "run_after_changes_command",
      "stage": "transferring",
      "identifier": "2821a9b0-ccb4-4b23-988d-7378bb7d7716",
      "server": 1519233,
      "total_items": null,
      "completed_items": null,
      "description": "Running SSH command #1",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "run_after_changes_command",
      "stage": "transferring",
      "identifier": "76fe4f05-9f2c-412a-9ac7-ed93c380ea2f",
      "server": 1519233,
      "total_items": null,
      "completed_items": null,
      "description": "Running SSH command #2",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "send_webhooks",
      "stage": "finishing",
      "identifier": "5de12a4e-de5a-45f0-99aa-64ac4c414490",
      "server": null,
      "total_items": 0,
      "completed_items": null,
      "description": "Delivering webhook notifications",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "send_emails",
      "stage": "finishing",
      "identifier": "f8560711-7f8e-4261-b24a-67e7eda5e56b",
      "server": null,
      "total_items": null,
      "completed_items": null,
      "description": "Sending emails",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    },
    {
      "step": "fix_versions",
      "stage": "finishing",
      "identifier": "2d60e072-8e00-406e-8913-13671b707abd",
      "server": null,
      "total_items": null,
      "completed_items": null,
      "description": "Saving build environment",
      "status": "pending",
      "logs": false,
      "deployment_started_at": null,
      "updated_at": "2024-09-27T11:42:01.000+02:00"
    }
  ]
}
Tree

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