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

# Get by ID
contract = DataContracts.get("f7a1b2c3-d4e5-6789-0abc-def123456789")
print(f"{contract.name}: {contract.entityStatus}")

# Get by FQN
contract = DataContracts.get_by_name("sales-orders-contract")

# Get effective contract for an entity (includes inherited properties)
contract = DataContracts.get(params={
    "entityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "entityType": "table"
})
{
  "id": "f7a1b2c3-d4e5-6789-0abc-def123456789",
  "name": "sales-orders-contract",
  "fullyQualifiedName": "sales-orders-contract",
  "description": "Data contract for the sales orders table",
  "entityStatus": "Active",
  "entity": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "table",
    "name": "sales_orders",
    "fullyQualifiedName": "sample_data.ecommerce_db.shopify.sales_orders"
  },
  "schema": [
    {"name": "order_id", "dataType": "INT", "constraint": "PRIMARY_KEY"},
    {"name": "customer_id", "dataType": "INT", "constraint": "NOT_NULL"}
  ],
  "semantics": [
    {"name": "hasOwner"},
    {"name": "hasDescription"}
  ],
  "sla": {
    "refreshFrequency": "PT1H",
    "availability": 99.9
  },
  "owners": [],
  "reviewers": [],
  "inherited": false,
  "version": 0.2,
  "updatedAt": 1769982800000,
  "updatedBy": "admin"
}

Retrieve a Data Contract

Get a data contract by its UUID, fully qualified name, or the entity it’s attached to.

Get by ID

id
string
required
UUID of the data contract.
fields
string
Comma-separated list of fields to include: owners, reviewers, extension.
include
string
default:"non-deleted"
Include filter: all, deleted, or non-deleted.

Get by Fully Qualified Name

Use GET /v1/dataContracts/name/{fqn} with the same query parameters.

Get Effective Contract for Entity

Use GET /v1/dataContracts/entity to get the effective contract for an entity, including inherited properties from its data product.
entityId
string
required
UUID of the entity.
entityType
string
required
Type of the entity (e.g., table, topic, dashboard).
fields
string
Comma-separated list of fields to include.
GET /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"
)

# Get by ID
contract = DataContracts.get("f7a1b2c3-d4e5-6789-0abc-def123456789")
print(f"{contract.name}: {contract.entityStatus}")

# Get by FQN
contract = DataContracts.get_by_name("sales-orders-contract")

# Get effective contract for an entity (includes inherited properties)
contract = DataContracts.get(params={
    "entityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "entityType": "table"
})
{
  "id": "f7a1b2c3-d4e5-6789-0abc-def123456789",
  "name": "sales-orders-contract",
  "fullyQualifiedName": "sales-orders-contract",
  "description": "Data contract for the sales orders table",
  "entityStatus": "Active",
  "entity": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "table",
    "name": "sales_orders",
    "fullyQualifiedName": "sample_data.ecommerce_db.shopify.sales_orders"
  },
  "schema": [
    {"name": "order_id", "dataType": "INT", "constraint": "PRIMARY_KEY"},
    {"name": "customer_id", "dataType": "INT", "constraint": "NOT_NULL"}
  ],
  "semantics": [
    {"name": "hasOwner"},
    {"name": "hasDescription"}
  ],
  "sla": {
    "refreshFrequency": "PT1H",
    "availability": 99.9
  },
  "owners": [],
  "reviewers": [],
  "inherited": false,
  "version": 0.2,
  "updatedAt": 1769982800000,
  "updatedBy": "admin"
}

Response Fields

id
string
UUID of the data contract.
name
string
Name of the data contract.
fullyQualifiedName
string
Fully qualified name.
entityStatus
string
Contract status: Draft, Active, or Deprecated.
entity
object
Reference to the data asset this contract applies to.
schema
array
Expected column definitions.
semantics
array
Semantics rules.
qualityExpectations
array
References to test cases.
sla
object
SLA expectations (refresh frequency, latency, availability).
termsOfUse
string
Terms of use in Markdown.
security
object
Security and access policy expectations.
inherited
boolean
Whether this contract is inherited from a data product.
latestResult
object
Latest validation result summary.
owners
array
Owner references.
reviewers
array
Reviewer references.
version
number
Entity version.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to view data contracts
404NOT_FOUNDData contract with given ID/FQN/entity not found