> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a Container

> Get a container by ID or fully qualified name

# Retrieve a Container

Get a single container by its unique ID or fully qualified name.

## Get by ID

<ParamField path="id" type="string" required>
  UUID of the container to retrieve.
</ParamField>

<ParamField query="fields" type="string">
  Comma-separated list of fields to include (e.g., `owners,tags,followers,votes,extension,domains,dataModel,children,sourceHash`).
</ParamField>

<ParamField query="include" type="string" default="non-deleted">
  Include `all`, `deleted`, or `non-deleted` entities.
</ParamField>

## Get by Fully Qualified Name

Use `GET /v1/containers/name/{fqn}` to retrieve by fully qualified name.

<ParamField path="fqn" type="string" required>
  Fully qualified name of the container (e.g., `s3_datalake.analytics-bucket`).
</ParamField>

<ParamField query="fields" type="string">
  Comma-separated list of fields to include: `owners`, `tags`, `followers`, `votes`, `extension`, `domains`, `dataModel`, `children`, `sourceHash`.
</ParamField>

<ParamField query="include" type="string" default="non-deleted">
  Include `all`, `deleted`, or `non-deleted` entities.
</ParamField>

<RequestExample dropdown>
  ```python GET /v1/containers/{id} theme={null}
  from metadata.sdk import configure
  from metadata.sdk.entities import Containers

  configure(
      host="https://your-company.open-metadata.org/api",
      jwt_token="your-jwt-token"
  )

  # Get by ID
  container = Containers.retrieve("14744329-85c2-499e-b1fa-249fb8162341")
  print(f"{container.fullyQualifiedName}: {container.description}")

  # Get by ID with fields
  container = Containers.retrieve(
      "14744329-85c2-499e-b1fa-249fb8162341",
      fields=["owners", "tags", "dataModel", "children"]
  )

  # Get by fully qualified name
  container = Containers.retrieve_by_name("s3_datalake.analytics-bucket")

  # Get by name with fields
  container = Containers.retrieve_by_name(
      "s3_datalake.analytics-bucket",
      fields=["owners", "tags", "dataModel", "children"]
  )
  ```

  ```java GET /v1/containers/{id} theme={null}
  import static org.openmetadata.sdk.fluent.Containers.*;

  // Get by ID
  var container = Containers.retrieve("14744329-85c2-499e-b1fa-249fb8162341");

  // Get by ID with fields
  var container = Containers.retrieve(
      "14744329-85c2-499e-b1fa-249fb8162341",
      "owners,tags,dataModel,children"
  );

  // Get by fully qualified name
  var container = Containers.retrieveByName("s3_datalake.analytics-bucket");

  // Get by name with fields
  var container = Containers.retrieveByName(
      "s3_datalake.analytics-bucket",
      "owners,tags,dataModel,children"
  );
  ```

  ```bash GET /v1/containers/{id} theme={null}
  # Get by ID
  curl "{base_url}/api/v1/containers/14744329-85c2-499e-b1fa-249fb8162341" \
    -H "Authorization: Bearer {access_token}"

  # Get by ID with fields
  curl "{base_url}/api/v1/containers/14744329-85c2-499e-b1fa-249fb8162341?fields=owners,tags,dataModel,children" \
    -H "Authorization: Bearer {access_token}"

  # Get by fully qualified name
  curl "{base_url}/api/v1/containers/name/s3_datalake.analytics-bucket" \
    -H "Authorization: Bearer {access_token}"

  # Get by name with fields
  curl "{base_url}/api/v1/containers/name/s3_datalake.analytics-bucket?fields=owners,tags,dataModel,children" \
    -H "Authorization: Bearer {access_token}"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "14744329-85c2-499e-b1fa-249fb8162341",
    "name": "analytics-bucket",
    "displayName": "Analytics Bucket",
    "fullyQualifiedName": "s3_datalake.analytics-bucket",
    "description": "Primary analytics data lake bucket",
    "version": 0.1,
    "updatedAt": 1769982673032,
    "updatedBy": "admin",
    "service": {
      "id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
      "type": "storageService",
      "name": "s3_datalake",
      "fullyQualifiedName": "s3_datalake",
      "deleted": false
    },
    "serviceType": "S3",
    "prefix": "/analytics/",
    "numberOfObjects": 150000,
    "size": 5368709120,
    "fileFormats": ["parquet", "json"],
    "dataModel": {
      "isPartitioned": true,
      "columns": [
        {"name": "event_id", "dataType": "STRING", "description": "Unique event identifier"},
        {"name": "timestamp", "dataType": "TIMESTAMP", "description": "Event timestamp"},
        {"name": "user_id", "dataType": "STRING", "description": "User identifier"}
      ]
    },
    "fullPath": "s3://analytics-bucket",
    "href": "http://localhost:8585/api/v1/containers/14744329-85c2-499e-b1fa-249fb8162341",
    "deleted": false,
    "owners": [],
    "tags": [],
    "followers": [],
    "votes": {
      "upVotes": 0,
      "downVotes": 0
    },
    "domains": []
  }
  ```
</ResponseExample>

***

## Returns

Returns a container object with all requested fields populated.

## Response

<ResponseField name="id" type="string">
  Unique identifier for the container (UUID format).
</ResponseField>

<ResponseField name="name" type="string">
  Container name.
</ResponseField>

<ResponseField name="fullyQualifiedName" type="string">
  Fully qualified name in format `service.containerName`.
</ResponseField>

<ResponseField name="displayName" type="string">
  Human-readable display name.
</ResponseField>

<ResponseField name="description" type="string">
  Description of the container in Markdown format.
</ResponseField>

<ResponseField name="service" type="object">
  Reference to the parent storage service.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      UUID of the storage service.
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of entity (always `storageService`).
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the storage service.
    </ResponseField>

    <ResponseField name="fullyQualifiedName" type="string">
      Fully qualified name of the storage service.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="serviceType" type="string">
  Type of storage service (e.g., S3, GCS, ADLS, CustomStorage).
</ResponseField>

<ResponseField name="dataModel" type="object" optional>
  Data model with column definitions. Only included when `fields` contains `dataModel`.

  <Expandable title="properties">
    <ResponseField name="isPartitioned" type="boolean">
      Whether the data is partitioned.
    </ResponseField>

    <ResponseField name="columns" type="array">
      Array of column definitions.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="children" type="array" optional>
  Nested child containers. Only included when `fields` contains `children`.
</ResponseField>

<ResponseField name="version" type="number">
  Version number for the entity.
</ResponseField>

<ResponseField name="owners" type="array" optional>
  List of owners. Only included when `fields` contains `owners`.
</ResponseField>

<ResponseField name="tags" type="array" optional>
  Classification tags. Only included when `fields` contains `tags`.
</ResponseField>

<ResponseField name="domains" type="array" optional>
  Domain assignments. Only included when `fields` contains `domains`.
</ResponseField>

***

## Error Handling

| Code  | Error Type     | Description                                   |
| ----- | -------------- | --------------------------------------------- |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token       |
| `403` | `FORBIDDEN`    | User lacks permission to view this container  |
| `404` | `NOT_FOUND`    | Container with given ID or FQN does not exist |
