Reimage a Container

Replace the base image of a container with a compatible image. Updating the image of a running container will cause it to restart.

Requires the containers-update permission.

Arguments
  • action
    string

    Set to reimage to reimage the container.

  • contents
    object

    Data required to create the task.

    Show child fields

Returns

Returns a Task Descriptor Object, otherwise returns an Error.

POST /v1/containers/5b9c2a77b6393d0001eb45fd/tasks

Example Request
$ curl https://api.cycle.io/v1/containers/5b9c2a77b6393d0001eb45fd/tasks \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-HUB-ID: HUB_ID"
\
-H 'Content-Type: application/json' \
-d '{"action":"reimage","contents":{"image_id":"5cf4c971b894940001b730a3"}}' \
-X POST
Example Response
{
"data": {
"action": "reimage",
"job_id": "5d01b9b3db2ab00001508cd8"
}
}