Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
domains
/
{id}
/
versions
GET /v1/domains/{id}/versions
from metadata.sdk import configure
from metadata.sdk.entities import Domains

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

# List all versions
versions = Domains.get_versions("a0729e98-e946-4e25-acde-10e8a2294ba1")
for v in versions:
    print(f"Version {v.version}: {v.description}")

# Get a specific version
domain_v1 = Domains.get_specific_version(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    "0.1"
)
print(f"Original description: {domain_v1.description}")
{
  "entityType": "domain",
  "versions": [
    "{\"id\":\"a0729e98-e946-4e25-acde-10e8a2294ba1\",\"name\":\"TestDomain\",\"fullyQualifiedName\":\"TestDomain\",\"version\":0.2,\"description\":\"Updated domain description\",\"domainType\":\"Aggregate\"}",
    "{\"id\":\"a0729e98-e946-4e25-acde-10e8a2294ba1\",\"name\":\"TestDomain\",\"fullyQualifiedName\":\"TestDomain\",\"version\":0.1,\"description\":\"Lorem ipsum...\",\"domainType\":\"Aggregate\"}"
  ]
}

Domain Versions

Every change to a domain entity creates a new version. Use these endpoints to view the version history and retrieve specific versions.

List Versions

id
string
required
UUID of the domain.

Get Specific Version

Use GET /v1/domains/{id}/versions/{version} to retrieve a specific version.
id
string
required
UUID of the domain.
version
string
required
Version number to retrieve (e.g., 0.2).
GET /v1/domains/{id}/versions
from metadata.sdk import configure
from metadata.sdk.entities import Domains

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

# List all versions
versions = Domains.get_versions("a0729e98-e946-4e25-acde-10e8a2294ba1")
for v in versions:
    print(f"Version {v.version}: {v.description}")

# Get a specific version
domain_v1 = Domains.get_specific_version(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    "0.1"
)
print(f"Original description: {domain_v1.description}")
{
  "entityType": "domain",
  "versions": [
    "{\"id\":\"a0729e98-e946-4e25-acde-10e8a2294ba1\",\"name\":\"TestDomain\",\"fullyQualifiedName\":\"TestDomain\",\"version\":0.2,\"description\":\"Updated domain description\",\"domainType\":\"Aggregate\"}",
    "{\"id\":\"a0729e98-e946-4e25-acde-10e8a2294ba1\",\"name\":\"TestDomain\",\"fullyQualifiedName\":\"TestDomain\",\"version\":0.1,\"description\":\"Lorem ipsum...\",\"domainType\":\"Aggregate\"}"
  ]
}

Returns

List versions returns an object with entityType and a versions array of serialized entity snapshots (newest first). Get specific version returns the full domain object as it existed at that version.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
404NOT_FOUNDDomain or version does not exist