# Containers

> Source: https://developers.cloud66.com/v3/endpoints/containers/

## Get Container

URL: https://developers.cloud66.com/v3/endpoints/containers/#get
Endpoint: GET /stacks/:stack_id/containers/:container_id
OAuth scope: admin

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

**Related models:** Container

### Parameters

- `stack_id` (string, required) — The stack UID
- `container_id` (string, required) — The container UID

### Response

```json
{
  "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"
  }
}
```

---

## List Containers

URL: https://developers.cloud66.com/v3/endpoints/containers/#list
Endpoint: GET /stacks/:stack_id/containers
OAuth scope: public

Get a list of all the containers of the stack.

**Related models:** Container, Pagination

### Parameters

- `stack_id` (string, required) — The stack UID
- `server_uid` (string, optional) — Server UID

### Response

```json
{
  "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
  }
}
```

---

## Stop Container

URL: https://developers.cloud66.com/v3/endpoints/containers/#stop
Endpoint: DELETE /stacks/:stack_id/containers/:container_id
OAuth scope: admin

Stop a container of the stack.

**Related models:** Container

### Parameters

- `stack_id` (string, required) — The stack UID
- `container_id` (string, required) — The container UID

### Response

```json
{
  "response": {
    "ok": true
  }
}
```
