GET /v1/containers/{id}
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.root}: {container.name.root}")
# Get by ID with fields
container = Containers.retrieve(
"14744329-85c2-499e-b1fa-249fb8162341",
fields=["owners", "tags", "dataModel"]
)
# 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"]
)
import org.openmetadata.schema.entity.data.Container;
// client is an initialized OpenMetadataClient.
// Get by ID
Container container = client.containers().get("14744329-85c2-499e-b1fa-249fb8162341");
// Get by ID with fields
Container containerWithFields = client.containers().get(
"14744329-85c2-499e-b1fa-249fb8162341",
"owners,tags,dataModel"
);
// Get by fully qualified name
Container containerByName = client.containers().getByName(
"s3_datalake.analytics-bucket"
);
// Get by name with fields
Container containerByNameWithFields = client.containers().getByName(
"s3_datalake.analytics-bucket",
"owners,tags,dataModel"
);
# 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" \
-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" \
-H "Authorization: Bearer {access_token}"
{
"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": []
}
Retrieve a Container
Get a container by ID or fully qualified name
GET
/
v1
/
containers
/
{id}
GET /v1/containers/{id}
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.root}: {container.name.root}")
# Get by ID with fields
container = Containers.retrieve(
"14744329-85c2-499e-b1fa-249fb8162341",
fields=["owners", "tags", "dataModel"]
)
# 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"]
)
import org.openmetadata.schema.entity.data.Container;
// client is an initialized OpenMetadataClient.
// Get by ID
Container container = client.containers().get("14744329-85c2-499e-b1fa-249fb8162341");
// Get by ID with fields
Container containerWithFields = client.containers().get(
"14744329-85c2-499e-b1fa-249fb8162341",
"owners,tags,dataModel"
);
// Get by fully qualified name
Container containerByName = client.containers().getByName(
"s3_datalake.analytics-bucket"
);
// Get by name with fields
Container containerByNameWithFields = client.containers().getByName(
"s3_datalake.analytics-bucket",
"owners,tags,dataModel"
);
# 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" \
-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" \
-H "Authorization: Bearer {access_token}"
{
"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": []
}
Retrieve a Container
Get a single container by its unique ID or fully qualified name.Get by ID
Comma-separated list of fields to include, for example
owners,tags,followers,votes,extension,domains,dataModel,sourceHash.Get by Fully Qualified Name
UseGET /v1/containers/name/{fqn} to retrieve by fully qualified name.
Comma-separated list of fields to include:
owners, tags, followers, votes, extension, domains, dataModel, sourceHash.GET /v1/containers/{id}
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.root}: {container.name.root}")
# Get by ID with fields
container = Containers.retrieve(
"14744329-85c2-499e-b1fa-249fb8162341",
fields=["owners", "tags", "dataModel"]
)
# 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"]
)
import org.openmetadata.schema.entity.data.Container;
// client is an initialized OpenMetadataClient.
// Get by ID
Container container = client.containers().get("14744329-85c2-499e-b1fa-249fb8162341");
// Get by ID with fields
Container containerWithFields = client.containers().get(
"14744329-85c2-499e-b1fa-249fb8162341",
"owners,tags,dataModel"
);
// Get by fully qualified name
Container containerByName = client.containers().getByName(
"s3_datalake.analytics-bucket"
);
// Get by name with fields
Container containerByNameWithFields = client.containers().getByName(
"s3_datalake.analytics-bucket",
"owners,tags,dataModel"
);
# 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" \
-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" \
-H "Authorization: Bearer {access_token}"
{
"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": []
}
Returns
Returns a container object with all requested fields populated.Response
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 |
Was this page helpful?