> ## 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.

# List Containers

> List all containers with optional filtering and pagination

# List Containers

List all containers with optional filtering and pagination.

## Query Parameters

**service** `string`

Filter by storage service fully qualified name.

**limit** `integer` (default: 10)

Maximum number of results to return (max: 1000000).

**before** `string`

Cursor for backward pagination.

**after** `string`

Cursor for forward pagination.

**fields** `string`

Comma-separated list of fields to include: `owners`, `tags`, `followers`, `votes`, `extension`, `domains`, `dataModel`, `sourceHash`. See [Supported Fields](#supported-fields) below.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

```python GET /v1/containers 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"
)

# List first page
containers = Containers.list(limit=50)
for c in containers.entities:
    print(f"{c.fullyQualifiedName.root}")

# List all with auto-pagination
for c in Containers.list_all():
    print(f"{c.fullyQualifiedName.root}")

# Filter by storage service
containers = Containers.list(
    filters={"service": "s3_datalake"},
    fields=["owners", "tags", "dataModel"],
    limit=50
)

for c in containers.entities:
    print(f"{c.fullyQualifiedName.root}")
    if c.owners:
        print(f"  Owners: {[o.name for o in c.owners.root]}")
    if c.tags:
        print(f"  Tags: {[t.tagFQN.root for t in c.tags]}")
```

```java GET /v1/containers theme={null}
import org.openmetadata.sdk.models.ListParams;
import org.openmetadata.sdk.models.ListResponse;
import org.openmetadata.schema.entity.data.Container;

// client is an initialized OpenMetadataClient.

// List first page
ListResponse<Container> firstPage = client.containers().list(
    new ListParams().setLimit(50)
);

for (Container container : firstPage.getData()) {
    System.out.println(container.getFullyQualifiedName());
}

// Filter by service with fields
ListResponse<Container> filtered = client.containers().list(
    new ListParams()
        .setService("s3_datalake")
        .setFields("owners,tags,dataModel")
        .setLimit(50)
);

for (Container container : filtered.getData()) {
    System.out.println(container.getFullyQualifiedName());
}
```

```bash GET /v1/containers theme={null}
# List all
curl "{base_url}/api/v1/containers?limit=50" \
  -H "Authorization: Bearer {access_token}"

# Filter by storage service
curl "{base_url}/api/v1/containers?service=s3_datalake&limit=50" \
  -H "Authorization: Bearer {access_token}"

# With fields
curl "{base_url}/api/v1/containers?service=s3_datalake&fields=owners,tags,dataModel&limit=50" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "data": [
    {
      "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"],
      "href": "http://localhost:8585/api/v1/containers/14744329-85c2-499e-b1fa-249fb8162341",
      "deleted": false,
      "owners": [],
      "tags": [],
      "followers": [],
      "votes": {
        "upVotes": 0,
        "downVotes": 0
      },
      "domains": []
    }
  ],
  "paging": {
    "after": "...",
    "total": 5
  }
}
```

***

## Returns

Returns a paginated list of container objects. By default, only basic fields are included. Use the `fields` parameter to request additional data.

## Response

**data** `array`

Array of container objects.

**properties**

**id** `string`

Unique identifier for the container (UUID format).

**name** `string`

Container name.

**fullyQualifiedName** `string`

Fully qualified name in format `service.containerName`.

**displayName** `string`

Human-readable display name.

**service** `object`

Reference to the parent storage service.

**serviceType** `string`

Type of storage service, for example S3, GCS, ADLS, CustomStorage.

**prefix** `string`

Path prefix for objects in the container.

**numberOfObjects** `number`

Number of objects stored in the container.

**size** `number`

Total size of the container in bytes.

**fileFormats** `array`

List of file formats stored in the container.

**owners** `array`

List of owners assigned to the container. Only included when `fields` contains `owners`.

**tags** `array`

Classification tags applied. Only included when `fields` contains `tags`.

**domains** `array`

Domain assignments for governance. Only included when `fields` contains `domains`.

**followers** `array`

Users following this container. Only included when `fields` contains `followers`.

**votes** `object`

User votes and ratings. Only included when `fields` contains `votes`.

**dataModel** `object`

Data model describing the schema of files. Only included when `fields` contains `dataModel`.

**extension** `object`

Custom properties. Only included when `fields` contains `extension`.

**paging** `object`

Pagination information.

**properties**

**total** `integer`

Total count of containers matching the query.

**after** `string`

Cursor for the next page of results. Null if this is the last page.

**before** `string`

Cursor for the previous page of results. Null if this is the first page.

***

## Supported Fields

The following fields can be requested via the `fields` query parameter:

| Field | Description |
| - | - |
| `owners` | Owner references (users and teams) |
| `tags` | Classification tags |
| `followers` | Users following the container |
| `votes` | User votes and ratings |
| `extension` | Custom property values |
| `domains` | Domain assignments for governance |
| `dataModel` | Data model with column definitions |
| `sourceHash` | Hash for change detection |

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to list containers |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.