Logo

Command Palette

Search for a command to run...

GET/stacks/:stack_id/containers/:container_id

Required Parameters

stack_idstring
The stack UID
container_idstring
The container UID

Get information of a container of the stack (includes container runtime information).

Related Models:Container

Request

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

Response

{
  "response": {
    "uid": "cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc",
    "server_uid": "c6014897b8c8e9f2fc204a3a9efdae05",
    "server_name": "Gazelle",
    "service_name": "web",
    "image": "quay.io/cloud66/sample-rails",
    "command": "bundle exec rackup -p 3000",
    "started_at": "2015-02-10T17:41:31Z",
    "ports": [
      {
        "container": 3000,
        "http": 80,
        "https": 443
      }
    ],
    "private_ip": "25.0.0.2",
    "docker_ip": null,
    "health_state": 1,
    "health_message": null,
    "health_source": "system",
    "capture_output": true,
    "restart_on_deploy": true,
    "created_at": "2015-02-10T17:41:37Z",
    "updated_at": "2015-02-17T14:40:17Z"
  }
}
GET/stacks/:stack_id/containers

Required Parameters

stack_idstring
The stack UID

Optional Parameters

server_uidstring
Server UID

Get a list of all the containers of the stack.

Related Models:ContainerPagination

Request

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

Response

{
  "response": [
    {
      "uid": "cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc",
      "server_uid": "c6014897b8c8e9f2fc204a3a9efdae05",
      "server_name": "Gazelle",
      "service_name": "web",
      "image": "quay.io/cloud66/sample-rails",
      "command": "bundle exec rackup -p 3000",
      "started_at": "2015-02-10T17:41:31Z",
      "ports": [
        {
          "container": 3000,
          "http": 80,
          "https": 443
        }
      ],
      "private_ip": "25.0.0.2",
      "docker_ip": null,
      "health_state": 1,
      "health_message": null,
      "health_source": "system",
      "capture_output": true,
      "restart_on_deploy": true,
      "created_at": "2015-02-10T17:41:37Z",
      "updated_at": "2015-02-17T14:40:17Z"
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}
DELETE/stacks/:stack_id/containers/:container_id

Required Parameters

stack_idstring
The stack UID
container_idstring
The container UID

Stop a container of the stack.

Related Models:Container

Request

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

Response

{
  "response": {
    "ok": true
  }
}