---
title: "List containers"
method: GET
path: "/containers/json"
tags: ["Container"]
---

# List containers

`GET /containers/json`

Returns a list of containers. For details on the format, see the
[inspect endpoint](#operation/ContainerInspect).

Note that it uses a different, smaller representation of a container
than inspecting a single container. For example, the list of linked
containers is not propagated .

## Query parameters

- `all` boolean
- `limit` integer
- `size` boolean
- `filters` string

## Response `200`

no error

- ContainerSummary[]
  - `Id` string — The ID of this container
  - `Names` string[] — The names that this container has been given
  - `Image` string — The name of the image used when creating this container
  - `ImageID` string — The ID of the image that this container was created from
  - `Command` string — Command to run when starting the container
  - `Created` integer — When the container was created
  - `Ports` Port[] — The ports exposed by this container
    - `IP` string, ip-address — Host IP address that the container's port is mapped to
    - `PrivatePort` integer, required — Port on the container
    - `PublicPort` integer — Port exposed on the host
    - `Type` 'tcp' | 'udp' | 'sctp', required
  - `SizeRw` integer — The size of files that have been created or changed by this container
  - `SizeRootFs` integer — The total size of all the files in this container
  - `Labels` object — User-defined key/value metadata.
  - `State` string — The state of this container (e.g. `Exited`)
  - `Status` string — Additional human-readable status of this container (e.g. `Exit 0`)
  - `HostConfig` object
    - `NetworkMode` string
  - `NetworkSettings` object — A summary of the container's network settings
    - `Networks` object
  - `Mounts` MountPoint[]
    - `Type` 'bind' | 'volume' | 'tmpfs' | 'npipe' | 'cluster' — The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume
    - `Name` string — Name is the name reference to the underlying data defined by `Source` e.g., the volume name.
    - `Source` string — Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty.
    - `Destination` string — Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container.
    - `Driver` string — Driver is the volume driver used to create the volume (if it is a volume).
    - `Mode` string — Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`"z"` on Linux, empty on Windows).
    - `RW` boolean — Whether the mount is mounted writable (read-write).
    - `Propagation` string — Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows.

## Other responses

- `400` — bad parameter
- `500` — server error

---

[API](https://skmtc.net/balena-os/apis/docker-engine-api.md) · [All operations](https://skmtc.net/balena-os/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/balena-os/docker-engine-api/versions/e20cfc2fb3f1/schema)
