Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
containers
POST /v1/containers
from metadata.sdk import configure
from metadata.sdk.entities import Containers
from metadata.generated.schema.api.data.createContainer import CreateContainerRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateContainerRequest(
    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"
)

container = Containers.create(request)
print(f"Created: {container.fullyQualifiedName}")
{
  "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": []
}

Create a Container

Create a new container within a storage service.

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 (e.g., 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.
prefix
string
Path prefix for objects in the container (e.g., /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 (e.g., csv, tsv, parquet, avro, json, jsonl, jsonGz, jsonZip).
dataModel
object
Data model describing the schema of files in the container.
fullPath
string
Full path of the container (e.g., s3://analytics-bucket/raw/events).
owners
array
Array of owner references (users or teams) to assign to the container.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the container.
extension
object
Custom property values defined by your organization’s metadata schema.
POST /v1/containers
from metadata.sdk import configure
from metadata.sdk.entities import Containers
from metadata.generated.schema.api.data.createContainer import CreateContainerRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateContainerRequest(
    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"
)

container = Containers.create(request)
print(f"Created: {container.fullyQualifiedName}")
{
  "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 the created container object with all specified properties and system-generated fields.

Response

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.
description
string
Description of the container in Markdown format.
service
object
Reference to the parent storage service.
serviceType
string
Type of storage service (e.g., 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.
dataModel
object
Data model describing the schema of files.
fullPath
string
Full path of the container.
owners
array
List of owners assigned to the container.
domains
array
Domain assignments for governance.
tags
array
Classification tags applied to the container.
extension
object
Custom property values defined by your organization’s metadata schema.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/containers instead of POST to perform an upsert. If a container with the same fullyQualifiedName already exists, it will be updated; otherwise, a new container is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/containers" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Bulk Create or Update (PUT)

Use PUT /v1/containers/bulk to create or update multiple containers in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/containers/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "analytics-bucket", "service": "s3_datalake" },
    { "name": "raw-data-bucket", "service": "s3_datalake" }
  ]'

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create containers
409ENTITY_ALREADY_EXISTSContainer with same name already exists in service (POST only)