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

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

# Soft delete by ID
APICollections.delete("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")

# Hard delete
APICollections.delete(
    "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
    hard_delete=True
)

# Delete by name
APICollections.delete_by_name("sample_api_service.pet")

# Delete by name with options
APICollections.delete_by_name(
    "sample_api_service.pet",
    hard_delete=True
)

# Restore a soft-deleted API collection
APICollections.restore("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "version": 0.2,
  "updatedAt": 1769982733673,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet",
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "fullyQualifiedName": "sample_api_service"
  },
  "serviceType": "Rest",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Delete an API Collection

Delete an API collection by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the API collection to delete.
recursive
boolean
default:"false"
Recursively delete child entities (API endpoints).
hardDelete
boolean
default:"false"
Permanently delete the API collection. If false, the API collection is soft-deleted and can be restored.

Delete by Name

Use DELETE /v1/apiCollections/name/{fqn} to delete by fully qualified name.
fqn
string
required
Fully qualified name of the API collection (e.g., sample_api_service.pet).
recursive
boolean
default:"false"
Recursively delete child entities (API endpoints).
hardDelete
boolean
default:"false"
Permanently delete the API collection.

Restore a Soft-Deleted API Collection

Use PUT /v1/apiCollections/restore to restore a soft-deleted API collection.
id
string
required
UUID of the soft-deleted API collection to restore.
DELETE /v1/apiCollections/{id}
from metadata.sdk import configure
from metadata.sdk.entities import APICollections

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

# Soft delete by ID
APICollections.delete("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")

# Hard delete
APICollections.delete(
    "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
    hard_delete=True
)

# Delete by name
APICollections.delete_by_name("sample_api_service.pet")

# Delete by name with options
APICollections.delete_by_name(
    "sample_api_service.pet",
    hard_delete=True
)

# Restore a soft-deleted API collection
APICollections.restore("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "version": 0.2,
  "updatedAt": 1769982733673,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet",
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "fullyQualifiedName": "sample_api_service"
  },
  "serviceType": "Rest",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Returns

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

Error Handling

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