---
title: "List all containers for an environment"
method: GET
path: "/projects/{project_id}/environments/{environment_id}/containers"
tags: ["Deployments"]
---

# List all containers for an environment

`GET /projects/{project_id}/environments/{environment_id}/containers`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/environments/{environment_id}/containers`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required
- `environment_id` integer, required

## Response `200`

List of containers

- ContainerListResponse
  - `containers` ContainerInfoResponse[], required
    - `container_id` string, required
    - `container_name` string, required
    - `container_port` integer, nullable
    - `cpu_limit_cores` number, double, nullable: CPU limit in whole cores (e.g. 1.0). None when no limit is configured.
    - `created_at` string, required
    - `error_message` string, nullable: Free-form error string from Docker's container state on exit.
    - `exit_code` integer, nullable: Process exit code reported by Docker. None while still running.
    - `exit_reason` string, nullable: Human-readable reason the container exited (e.g. "OOMKilled", "Killed by SIGKILL (exit code 137)", "Exit code 1"). None while running.
    - `finished_at` string, nullable: When the container exited (Docker's FinishedAt). None while running.
    - `health_checked_at` string, nullable
    - `health_detail` string, nullable
    - `health_state` string
    - `image_name` string, required
    - `node_name` string, nullable: Node name where this container is running. None for local (single-node) deployments.
    - `oom_killed` boolean, nullable: True when Docker's OOM killer terminated the container.
    - `restart_count` integer, nullable: Container restart count from Docker. The UI shows a chip when this is > 0 so a crash loop is visible without opening detail.
    - `runtime` string: What runs this container: `docker` for a Docker container, `firecracker` for a microVM replica (`micro_vm` isolation).
    - `service_name` string, nullable: Compose service name (e.g. "web", "redis"). None for single-container deployments.
    - `service_url` string, nullable: Per-service URL for compose deployments (e.g. "https://web-myapp.localho.st"). The service's first public URL when it exposes several ports.
    - `service_urls` ServicePublicUrl[]: Every public URL of this compose service, one per public port.
      - `port` integer, required: Container port this URL routes to.
      - `service` string, required: Compose service this URL routes to.
      - `url` string, required
    - `started_at` string, nullable: When the container's main process most recently started. The UI uses this for the uptime label so the count resets when a container is restarted in place. None for containers that never started.
    - `status` string, required
  - `total` integer, required

## Other responses

- `400`: Not a server-type project
- `404`: Project or environment not found
- `409`: A container is placed on this process, which has no local Docker daemon
- `500`: Internal server error

## Changes

- **2026-10-31** `b615b8abfd94`: 1 info
  - added the optional property `containers/items/runtime` to the response with the `200` status
- **2026-10-18** `b1faaa2f65bf`: 4 info
  - added the optional property `containers/items/container_port` to the response with the `200` status
  - added the optional property `containers/items/health_checked_at` to the response with the `200` status
  - added the optional property `containers/items/health_detail` to the response with the `200` status
  - added the optional property `containers/items/health_state` to the response with the `200` status
- **2026-10-05** `4b228ebed583`: 2 info
  - added the non-success response with the status `409`
  - added the optional property `containers/items/service_urls` to the response with the `200` status
- **2026-10-05** `63a80791dc58`: 1 warning, 1 info
  - removed the optional property `containers/items/service_urls` from the response with the `200` status
  - removed the non-success response with the status `409`
- **2026-09-27** `2fa9c556f2e8`: 1 info
  - added the optional property `containers/items/service_urls` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/environments/:environment_id/containers/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
