---
title: "Get All Containers"
method: GET
path: "/api/v2/containers"
tags: ["Containers"]
---

# Get All Containers

`GET /api/v2/containers`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/containers`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

Get all containers for your organization.

## Query parameters

- `filter[tags]` string
- `group_by` string
- `sort` string
- `page[size]` integer
- `page[cursor]` string

## Response `200`

OK

- ContainersResponse: List of containers.
  - `data` ContainerItem[]: Array of Container objects.
    - union: Possible Container models.
      - Container: Container object.
        - `attributes` ContainerAttributes: Attributes for a container.
          - `container_id` string: The ID of the container.
          - `created_at` string: Time the container was created.
          - `host` string: Hostname of the host running the container.
          - `image_digest` string, nullable: Digest of the compressed image manifest.
          - `image_name` string: Name of the associated container image.
          - `image_tags` string[], nullable: List of image tags associated with the container image.
          - `name` string: Name of the container.
          - `started_at` string: Time the container was started.
          - `state` string: State of the container. This depends on the container runtime.
          - `tags` string[]: List of tags associated with the container.
        - `id` string: Container ID.
        - `type` 'container': Type of container.
      - ContainerGroup: Container group object.
        - `attributes` ContainerGroupAttributes: Attributes for a container group.
          - `count` integer: Number of containers in the group.
          - `tags` object: Tags from the group name parsed in key/value format.
        - `id` string: Container Group ID.
        - `relationships` ContainerGroupRelationships: Relationships to containers inside a container group.
          - `containers` ContainerGroupRelationshipsLink: Relationships to Containers inside a Container Group.
            - `data` string[]: Links data.
            - `links` ContainerGroupRelationshipsLinks: Links attributes.
              - …
        - `type` 'container_group': Type of container group.
  - `links` ContainersResponseLinks: Pagination links.
    - `first` string: Link to the first page.
    - `last` string, nullable: Link to the last page.
    - `next` string, nullable: Link to the next page.
    - `prev` string, nullable: Link to previous page.
    - `self` string: Link to current page.
  - `meta` ContainerMeta: Response metadata object.
    - `pagination` ContainerMetaPage: Paging attributes.
      - `cursor` string: The cursor used to get the current results, if any.
      - `limit` integer: Number of results returned
      - `next_cursor` string: The cursor used to get the next results, if any.
      - `prev_cursor` string, nullable: The cursor used to get the previous results, if any.
      - `total` integer: Total number of records that match the query.
      - `type` 'cursor_limit': Type of Container pagination.

## Other responses

- `400`: Bad Request
- `403`: Authentication Error
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
