GET/stacks/:stack_id/deployments/:deployment_id
Get Deploymentpublic
Required Parameters
stack_id
stringThe stack UID
deployment_id
integerThe deployment ID
Get information of a single deployment.
Related Models:Deployment
Request
GET
/stacks/:stack_id/deployments/:deployment_idcurl -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
List Deploymentspublic
Required Parameters
stack_id
stringThe stack UID
Get list of all deployments of a stack.
Request
GET
/stacks/:stack_id/deploymentscurl -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
Redeploy Stackredeploy
Required Parameters
stack_id
stringThe stack UID
Optional Parameters
git_ref
stringGit reference (branch, tag or hash). Non-docker only.
services
stringDeploy only the service(s) & image(s) specified (Docker only).
deployment_profile
stringDeploy using a deployment profile
user_reference
stringAdds 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/deploymentscurl -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
Cancel Deploymentredeploy
Required Parameters
stack_id
stringThe stack UID
deployment_id
integerThe deployment ID
Cancel a deployment.
Related Models:Deployment
Request
DELETE
/stacks/:stack_id/deployments/:deployment_idcurl -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"
}
}