Skip to main content
DELETE
https://sandbox.getcollate.io/api
/
v1
/
containers
/
{id}
DELETE /v1/containers/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Containers

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

# Soft delete by ID
Containers.delete("14744329-85c2-499e-b1fa-249fb8162341")

# Hard delete
Containers.delete(
    "14744329-85c2-499e-b1fa-249fb8162341",
    hard_delete=True
)

# Delete by name
Containers.delete_by_name("s3_datalake.analytics-bucket")

# Delete by name with options
Containers.delete_by_name(
    "s3_datalake.analytics-bucket",
    hard_delete=True,
    recursive=True
)

# Restore a soft-deleted container
Containers.restore("14744329-85c2-499e-b1fa-249fb8162341")
{
  "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.2,
  "updatedAt": 1769982673032,
  "updatedBy": "admin",
  "service": {
    "id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
    "type": "storageService",
    "name": "s3_datalake",
    "fullyQualifiedName": "s3_datalake"
  },
  "serviceType": "S3",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Delete a Container

Delete a container by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the container to delete.
recursive
boolean
default:"false"
Recursively delete child containers.
hardDelete
boolean
default:"false"
Permanently delete the container. If false, the container is soft-deleted and can be restored.

Delete by Name

Use DELETE /v1/containers/name/{fqn} to delete by fully qualified name.
fqn
string
required
Fully qualified name of the container (e.g., s3_datalake.analytics-bucket).
recursive
boolean
default:"false"
Recursively delete child containers.
hardDelete
boolean
default:"false"
Permanently delete the container.

Restore a Soft-Deleted Container

Use PUT /v1/containers/restore to restore a soft-deleted container.
id
string
required
UUID of the soft-deleted container to restore.
DELETE /v1/containers/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Containers

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

# Soft delete by ID
Containers.delete("14744329-85c2-499e-b1fa-249fb8162341")

# Hard delete
Containers.delete(
    "14744329-85c2-499e-b1fa-249fb8162341",
    hard_delete=True
)

# Delete by name
Containers.delete_by_name("s3_datalake.analytics-bucket")

# Delete by name with options
Containers.delete_by_name(
    "s3_datalake.analytics-bucket",
    hard_delete=True,
    recursive=True
)

# Restore a soft-deleted container
Containers.restore("14744329-85c2-499e-b1fa-249fb8162341")
{
  "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.2,
  "updatedAt": 1769982673032,
  "updatedBy": "admin",
  "service": {
    "id": "d1589e1d-2ab0-431c-a383-15e4be20a106",
    "type": "storageService",
    "name": "s3_datalake",
    "fullyQualifiedName": "s3_datalake"
  },
  "serviceType": "S3",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Returns

Soft delete returns the container object with deleted: true. Hard delete returns no content (204). Restore returns the restored container object.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete this container
404NOT_FOUNDContainer with given ID or FQN does not exist