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

# Soft delete by ID
APIEndpoints.delete("1f61427a-4a64-4070-9ac8-1d29302dac7c")

# Hard delete
APIEndpoints.delete(
    "1f61427a-4a64-4070-9ac8-1d29302dac7c",
    hard_delete=True
)

# Delete by name
APIEndpoints.delete_by_name("sample_api_service.pet.addPet")

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

# Restore a soft-deleted API endpoint
APIEndpoints.restore("1f61427a-4a64-4070-9ac8-1d29302dac7c")
{
  "id": "1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "name": "addPet",
  "displayName": "Add Pet",
  "fullyQualifiedName": "sample_api_service.pet.addPet",
  "description": "add a new pet",
  "version": 0.2,
  "updatedAt": 1769982733987,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet/addPet",
  "requestMethod": "POST",
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service"
  },
  "serviceType": "Rest",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Delete an API Endpoint

Delete an API endpoint 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 endpoint to delete.
recursive
boolean
default:"false"
Recursively delete child entities.
hardDelete
boolean
default:"false"
Permanently delete the API endpoint. If false, the API endpoint is soft-deleted and can be restored.

Delete by Name

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

Restore a Soft-Deleted API Endpoint

Use PUT /v1/apiEndpoints/restore to restore a soft-deleted API endpoint.
id
string
required
UUID of the soft-deleted API endpoint to restore.
DELETE /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"
)

# Soft delete by ID
APIEndpoints.delete("1f61427a-4a64-4070-9ac8-1d29302dac7c")

# Hard delete
APIEndpoints.delete(
    "1f61427a-4a64-4070-9ac8-1d29302dac7c",
    hard_delete=True
)

# Delete by name
APIEndpoints.delete_by_name("sample_api_service.pet.addPet")

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

# Restore a soft-deleted API endpoint
APIEndpoints.restore("1f61427a-4a64-4070-9ac8-1d29302dac7c")
{
  "id": "1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "name": "addPet",
  "displayName": "Add Pet",
  "fullyQualifiedName": "sample_api_service.pet.addPet",
  "description": "add a new pet",
  "version": 0.2,
  "updatedAt": 1769982733987,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet/addPet",
  "requestMethod": "POST",
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service"
  },
  "serviceType": "Rest",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Returns

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

Error Handling

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