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

# Update a Container

> Create or update a container with a full request body

# Update a Container

Create a container or update it if it already exists, using `PUT /v1/containers` with the full request body. Send the complete definition, not just the fields you want to change. To change only some fields, use `PATCH` with a JSON Patch array and the `application/json-patch+json` content type, as shown in the PATCH examples below.

## Body Parameters

**name** `string` *required*

Name of the container. Must be unique within the parent storage service or parent container.

**service** `string` *required*

Fully qualified name of the parent StorageService, for example `s3_datalake`.

**displayName** `string`

Human-readable display name for the container.

**description** `string`

Description of the container in Markdown format.

**parent** `object`

Reference to a parent container for nested containers.

**properties**

**id** `string`

UUID of the parent container.

**type** `string`

Type of entity (always `container`).

**prefix** `string`

Path prefix for objects in the container, for example `/raw/events/`.

**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, for example `csv`, `tsv`, `parquet`, `avro`, `json`, `jsonl`, `jsonGz`, `jsonZip`.

**dataModel** `object`

Data model describing the schema of files in the container.

**properties**

**isPartitioned** `boolean`

Whether the data is partitioned.

**columns** `array`

Array of column definitions for the data model.

**properties**

**name** `string` *required*

Column name.

**dataType** `string` *required*

Data type, for example `STRING`, `INT`, `DOUBLE`, `TIMESTAMP`.

**description** `string`

Description of the column.

**fullPath** `string`

Full path of the container, for example `s3://analytics-bucket/raw/events`.

**owners** `array`

Array of owner references (users or teams) to assign to the container.

**properties**

**id** `string`

UUID of the owner entity.

**type** `string`

Type of owner entity, for example `user`, `team`.

**name** `string`

Name of the owner entity.

**domains** `array`

Fully qualified names of the domains to assign for governance purposes.

**tags** `array`

Array of classification tags to apply to the container.

**properties**

**tagFQN** `string` *required*

Fully qualified name of the tag.

**labelType** `string`

Type of label, for example `Manual`, `Derived`, `Propagated`.

**state** `string`

State of the tag, for example `Suggested`, `Confirmed`.

**extension** `object`

Custom property values defined by your organization's metadata schema.

```bash PUT /v1/containers theme={null}
curl -X PUT "{base_url}/api/v1/containers" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "analytics-bucket",
    "displayName": "Analytics Bucket",
    "service": "s3_datalake",
    "description": "Primary analytics data lake bucket",
    "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"
  }'
```

```python PATCH /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"
)

# Retrieve, modify, and update
container = Containers.retrieve("14744329-85c2-499e-b1fa-249fb8162341")
container.description = "Updated: Primary analytics bucket with partitioned parquet data"
container.numberOfObjects = 175000
container.size = 6442450944
updated = Containers.update(container)

print(f"Updated to version {updated.version.root}")
```

```java PATCH /v1/containers/{id} theme={null}
import org.openmetadata.schema.entity.data.Container;

// client is an initialized OpenMetadataClient.

// Retrieve, modify, and update
Container container = client.containers().get("14744329-85c2-499e-b1fa-249fb8162341");
container.setDescription("Updated: Primary analytics bucket with partitioned parquet data");
Container updated = client.containers().update("14744329-85c2-499e-b1fa-249fb8162341", container);
```

```bash PATCH /v1/containers/{id} theme={null}
# Update by ID
curl -X PATCH "{base_url}/api/v1/containers/14744329-85c2-499e-b1fa-249fb8162341" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json-patch+json" \
  -d '[
    {"op": "replace", "path": "/description", "value": "Updated: Primary analytics bucket with partitioned parquet data"}
  ]'

# Update by name
curl -X PATCH "{base_url}/api/v1/containers/name/s3_datalake.analytics-bucket" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json-patch+json" \
  -d '[
    {"op": "replace", "path": "/description", "value": "Updated: Primary analytics bucket with partitioned parquet data"}
  ]'
```

```json Response theme={null}
{
  "id": "14744329-85c2-499e-b1fa-249fb8162341",
  "name": "analytics-bucket",
  "displayName": "Analytics Bucket",
  "fullyQualifiedName": "s3_datalake.analytics-bucket",
  "description": "Updated: Primary analytics bucket with partitioned parquet data",
  "version": 0.2,
  "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": 175000,
  "size": 6442450944,
  "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": []
}
```

***

## Returns

Returns the updated container object with the new version number.

## Response

**id** `string`

Unique identifier for the container (UUID format).

**name** `string`

Container name.

**fullyQualifiedName** `string`

Fully qualified name in format `service.containerName`.

**description** `string`

Updated description.

**version** `number`

Incremented version number.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `400` | `BAD_REQUEST` | Invalid or malformed request body |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to update this container |
| `409` | `CONFLICT` | Concurrent modification detected |


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