Skip to main content
PATCH
https://sandbox.getcollate.io/api
/
v1
/
apiEndpoints
/
{id}
PATCH /v1/apiEndpoints/{id}
from metadata.sdk import configure
from metadata.sdk.entities import APIEndpoints

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

# Retrieve, modify, and update
ep = APIEndpoints.retrieve("1f61427a-4a64-4070-9ac8-1d29302dac7c")
ep.description = "Updated: Add a new pet to the store inventory"
updated = APIEndpoints.update(ep)

print(f"Updated to version {updated.version}")
{
  "id": "1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "name": "addPet",
  "displayName": "Add Pet",
  "fullyQualifiedName": "sample_api_service.pet.addPet",
  "description": "Updated: Add a new pet to the store inventory",
  "version": 0.2,
  "updatedAt": 1769982733987,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet/addPet",
  "requestMethod": "POST",
  "requestSchema": {
    "schemaType": "JSON",
    "schemaFields": [
      {"name": "id", "dataType": "INT", "description": "ID of pet"}
    ]
  },
  "href": "http://localhost:8585/api/v1/apiEndpoints/1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}

Update an API Endpoint

Update an API endpoint’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 endpoint to update.

Update by Name

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

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 URL for the API endpoint.
requestMethod
string
Updated HTTP request method: GET, POST, PUT, PATCH, or DELETE.
requestSchema
object
Updated request body schema.
responseSchema
object
Updated response body schema.
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/apiEndpoints/{id}
from metadata.sdk import configure
from metadata.sdk.entities import APIEndpoints

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

# Retrieve, modify, and update
ep = APIEndpoints.retrieve("1f61427a-4a64-4070-9ac8-1d29302dac7c")
ep.description = "Updated: Add a new pet to the store inventory"
updated = APIEndpoints.update(ep)

print(f"Updated to version {updated.version}")
{
  "id": "1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "name": "addPet",
  "displayName": "Add Pet",
  "fullyQualifiedName": "sample_api_service.pet.addPet",
  "description": "Updated: Add a new pet to the store inventory",
  "version": 0.2,
  "updatedAt": 1769982733987,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet/addPet",
  "requestMethod": "POST",
  "requestSchema": {
    "schemaType": "JSON",
    "schemaFields": [
      {"name": "id", "dataType": "INT", "description": "ID of pet"}
    ]
  },
  "href": "http://localhost:8585/api/v1/apiEndpoints/1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}

Returns

Returns the updated API endpoint object with the new version number.

Response

id
string
Unique identifier for the API endpoint (UUID format).
name
string
API endpoint name.
fullyQualifiedName
string
Fully qualified name in format service.collection.endpointName.
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 endpoint
404NOT_FOUNDAPI endpoint with given ID or FQN does not exist
409CONFLICTConcurrent modification detected