Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
apiCollections
POST /v1/apiCollections
from metadata.sdk import configure
from metadata.sdk.entities import APICollections
from metadata.generated.schema.api.data.createAPICollection import CreateAPICollectionRequest

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

request = CreateAPICollectionRequest(
    name="pet",
    service="sample_api_service",
    endpointURL="https://petstore3.swagger.io/#/pet",
    description="Pet-related API endpoints"
)

api_collection = APICollections.create(request)
print(f"Created: {api_collection.fullyQualifiedName}")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "version": 0.1,
  "updatedAt": 1769982733673,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet",
  "href": "http://localhost:8585/api/v1/apiCollections/0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "fullyQualifiedName": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}

Create an API Collection

Create a new API collection within an API service.

Body Parameters

name
string
required
Name of the API collection. Must be unique within the parent API service.
service
string
required
Fully qualified name of the parent APIService (e.g., sample_api_service).
endpointURL
string
Base URL for the API collection (e.g., https://petstore3.swagger.io/#/pet).
displayName
string
Human-readable display name for the API collection.
description
string
Description of the API collection in Markdown format.
owners
array
Array of owner references (users or teams) to assign to the API collection.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the API collection.
extension
object
Custom property values defined by your organization’s metadata schema.
POST /v1/apiCollections
from metadata.sdk import configure
from metadata.sdk.entities import APICollections
from metadata.generated.schema.api.data.createAPICollection import CreateAPICollectionRequest

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

request = CreateAPICollectionRequest(
    name="pet",
    service="sample_api_service",
    endpointURL="https://petstore3.swagger.io/#/pet",
    description="Pet-related API endpoints"
)

api_collection = APICollections.create(request)
print(f"Created: {api_collection.fullyQualifiedName}")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "version": 0.1,
  "updatedAt": 1769982733673,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet",
  "href": "http://localhost:8585/api/v1/apiCollections/0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "fullyQualifiedName": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}

Returns

Returns the created API collection object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the API collection (UUID format).
name
string
API collection name.
fullyQualifiedName
string
Fully qualified name in format service.collectionName.
displayName
string
Human-readable display name.
description
string
Description of the API collection in Markdown format.
endpointURL
string
Base URL for the API collection.
service
object
Reference to the parent API service.
serviceType
string
Type of API service (e.g., Rest).
owners
array
List of owners assigned to the API collection.
domains
array
Domain assignments for governance.
tags
array
Classification tags applied to the API collection.
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/apiCollections instead of POST to perform an upsert. If an API collection with the same fullyQualifiedName already exists, it will be updated; otherwise, a new API collection is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/apiCollections" \
  -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/apiCollections/bulk to create or update multiple API collections in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/apiCollections/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "pet", "service": "sample_api_service" },
    { "name": "store", "service": "sample_api_service" }
  ]'

Error Handling

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