Logo

Command Palette

Search for a command to run...

GET/stacks/:stack_id/deployments/:deployment_id

Required Parameters

stack_idstring
The stack UID
deployment_idinteger
The deployment ID

Get information of a single deployment.

Related Models:Deployment

Request

GET
/stacks/:stack_id/deployments/:deployment_id
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/deployments/:deployment_id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "id": 107,
    "triggered_by": "test@cloud66.com",
    "triggered_via": {
      "code": 0,
      "meaning": "web"
    },
    "started_at": "2014-08-29T17:46:16Z",
    "finished_at": "2014-08-29T17:58:23Z",
    "outcome": {
      "code": 1,
      "meaning": "success"
    },
    "git_hash": "5675fcd8f9e6dc534ecf1410c0661c066097e310",
    "deploy_session": "OhBHNzkXSl",
    "deploy_type": {
      "code": 0,
      "meaning": "build"
    },
    "is_head": true,
    "is_live": true,
    "reverted": null,
    "reverted_by": null,
    "reverted_at": null,
    "is_deploying": false,
    "commit_url": "https://github.com/cloud66-samples/rails-test/commit/5675fcd8f9e6dc534ecf1410c0661c066097e310"
  }
}
GET/stacks/:stack_id/deployments

Required Parameters

stack_idstring
The stack UID

Get list of all deployments of a stack.

Related Models:DeploymentPagination

Request

GET
/stacks/:stack_id/deployments
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/deployments" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": [
    {
      "id": 107,
      "triggered_by": "test@cloud66.com",
      "triggered_via": {
        "code": 0,
        "meaning": "web"
      },
      "started_at": "2014-08-29T17:46:16Z",
      "finished_at": "2014-08-29T17:58:23Z",
      "outcome": {
        "code": 1,
        "meaning": "success"
      },
      "git_hash": "5675fcd8f9e6dc534ecf1410c0661c066097e310",
      "deploy_session": "OhBHNzkXSl",
      "deploy_type": {
        "code": 0,
        "meaning": "build"
      },
      "is_head": true,
      "is_live": true,
      "reverted": null,
      "reverted_by": null,
      "reverted_at": null,
      "is_deploying": false,
      "commit_url": "https://github.com/cloud66-samples/rails-test/commit/5675fcd8f9e6dc534ecf1410c0661c066097e310"
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}
POST/stacks/:stack_id/deployments

Required Parameters

stack_idstring
The stack UID

Optional Parameters

git_refstring
Git reference (branch, tag or hash). Non-docker only.
servicesstring
Deploy only the service(s) & image(s) specified (Docker only).
deployment_profilestring
Deploy using a deployment profile
user_referencestring
Adds a value to the metadata field of the Stack Action (to allow you to match actions against your own identifiers). Max 255 chars.

Redeploy a stack.

Related Models:Deployment

Request

POST
/stacks/:stack_id/deployments
curl -X POST \
  "https://app.cloud66.com/api/3/stacks/:stack_id/deployments?git_ref=a_git_tag_or_hash&services=service1:image_tagA,service2:image_tagB&deployment_profile=my-deploy-profile-name&user_reference=useful-reference-123" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "stack_id": "5999b763474b0eafa5fafb64bff0ba80"
}'

Response

{
  "response": {
    "id": 108,
    "message": "Deployment scheduled",
    "queued": true
  }
}
DELETE/stacks/:stack_id/deployments/:deployment_id

Required Parameters

stack_idstring
The stack UID
deployment_idinteger
The deployment ID

Cancel a deployment.

Related Models:Deployment

Request

DELETE
/stacks/:stack_id/deployments/:deployment_id
curl -X DELETE \
  "https://app.cloud66.com/api/3/stacks/:stack_id/deployments/:deployment_id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "ok": true,
    "message": "Deployment cancelled"
  }
}