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

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

# Soft delete
DataContracts.delete("f7a1b2c3-d4e5-6789-0abc-def123456789")

# Hard delete (permanent)
DataContracts.delete("f7a1b2c3-d4e5-6789-0abc-def123456789", hard_delete=True)

# Restore a soft-deleted contract
DataContracts.restore("f7a1b2c3-d4e5-6789-0abc-def123456789")

Delete a Data Contract

Delete a data contract by ID or fully qualified name. Supports both soft delete and permanent (hard) delete.

Delete by ID

id
string
required
UUID of the data contract.
hardDelete
boolean
default:"false"
Set to true to permanently delete the contract. Soft-deleted contracts can be restored.
recursive
boolean
default:"false"
Recursively delete child entities.

Delete by FQN

Use DELETE /v1/dataContracts/name/{fqn} with the same query parameters.
DELETE /v1/dataContracts/{id}
from metadata.sdk import configure
from metadata.sdk.entities import DataContracts

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

# Soft delete
DataContracts.delete("f7a1b2c3-d4e5-6789-0abc-def123456789")

# Hard delete (permanent)
DataContracts.delete("f7a1b2c3-d4e5-6789-0abc-def123456789", hard_delete=True)

# Restore a soft-deleted contract
DataContracts.restore("f7a1b2c3-d4e5-6789-0abc-def123456789")

Restore

Use PUT /v1/dataContracts/restore with a JSON body containing the id of the soft-deleted contract to restore it.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete data contracts
404NOT_FOUNDData contract not found