Deploy Stack Build

Creates a job that deploys the specified stack build to an environment.

Requires the stacks-builds-manage permission.

Arguements
  • id
    string

    A unique identifier for the build.

  • stack_id
    string

    A unique identifier for the stack that this build is associated with.

  • environment_id
    string

    The ID of the environment you wish to deploy this build to.

  • update
    object
    optional

    If you're redeploying to an environment that's already been created you'll use the optional "update" object to describe the changes.

    Show child fields

Returns

Returns a Task Descriptor Object, otherwise returns an Error.

POST /v1/stacks/{STACK_ID}/builds/{BUILD_ID}/tasks

Example Request
$ curl https://api.cycle.io/v1/stacks/5a98710df231a500017f9aa4/builds/5d02f7e9b89494000108422a/tasks \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-Hub-Id: HUB_ID"
\
-H 'Content-Type: application/json'
-d '{"action":"deploy","contents":{"environment_id":"5cec602e4146380001934759","update":{"container_identifier":{"reimage":true,"reconfigure":false},"container_identifier_2":{"reimage":true,"reconfigure":false}}}}'
-X POST
Example Response
{
"data": {
"action": "deploy",
"job_id": "5d01b9b3db2ab00001508cd8"
}
}