Skip to main content
PATCH
https://sandbox.getcollate.io/api
/
v1
/
apiCollections
/
{id}
PATCH /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"
)

# Retrieve, modify, and update
ac = APICollections.retrieve("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")
ac.description = "Updated: Pet-related API endpoints for the Petstore service"
updated = APICollections.update(ac)

print(f"Updated to version {updated.version}")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "description": "Updated: Pet-related API endpoints for the Petstore service",
  "version": 0.2,
  "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": []
}

Update an API Collection

Update an API collection’s properties using JSON Merge Patch. You can update by ID or by fully qualified name.

Update by ID

id
string
required
UUID of the API collection to update.

Update by Name

Use PATCH /v1/apiCollections/name/{fqn} to update by fully qualified name.
fqn
string
required
Fully qualified name of the API collection (e.g., sample_api_service.pet).

Body Parameters

Send a JSON object with the fields to update. Only provided fields are changed.
description
string
Updated description in Markdown format.
displayName
string
Updated display name.
endpointURL
string
Updated base URL for the API collection.
owners
array
Updated list of owner references.
tags
array
Updated classification tags.
domain
string
Updated domain FQN.
extension
object
Updated custom property values.
PATCH /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"
)

# Retrieve, modify, and update
ac = APICollections.retrieve("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")
ac.description = "Updated: Pet-related API endpoints for the Petstore service"
updated = APICollections.update(ac)

print(f"Updated to version {updated.version}")
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "description": "Updated: Pet-related API endpoints for the Petstore service",
  "version": 0.2,
  "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 updated API collection object with the new version number.

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.
description
string
Updated description.
version
number
Incremented version number.

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid JSON patch or malformed request
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to update this API collection
404NOT_FOUNDAPI collection with given ID or FQN does not exist
409CONFLICTConcurrent modification detected