GET /v1/domains/{id}/versions
from metadata.sdk import configure
from metadata.sdk.entities import Domains
configure(
host="https://your-company.open-metadata.org/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}")
import static org.openmetadata.sdk.fluent.Domains.*;
// List all versions
var history = Domains.getVersions("a0729e98-e946-4e25-acde-10e8a2294ba1");
for (var version : history.getVersions()) {
System.out.println("Version: " + version);
}
// Get a specific version
var v1 = Domains.getSpecificVersion(
"a0729e98-e946-4e25-acde-10e8a2294ba1",
0.1
);
System.out.println("Description: " + v1.getDescription());
# List all versions
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions" \
-H "Authorization: Bearer {access_token}"
# Get a specific version
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions/0.1" \
-H "Authorization: Bearer {access_token}"
{
"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
List and retrieve historical versions of a domain
GET
/
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.open-metadata.org/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}")
import static org.openmetadata.sdk.fluent.Domains.*;
// List all versions
var history = Domains.getVersions("a0729e98-e946-4e25-acde-10e8a2294ba1");
for (var version : history.getVersions()) {
System.out.println("Version: " + version);
}
// Get a specific version
var v1 = Domains.getSpecificVersion(
"a0729e98-e946-4e25-acde-10e8a2294ba1",
0.1
);
System.out.println("Description: " + v1.getDescription());
# List all versions
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions" \
-H "Authorization: Bearer {access_token}"
# Get a specific version
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions/0.1" \
-H "Authorization: Bearer {access_token}"
{
"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
UUID of the domain.
Get Specific Version
UseGET /v1/domains/{id}/versions/{version} to retrieve a specific version.
UUID of the domain.
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.open-metadata.org/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}")
import static org.openmetadata.sdk.fluent.Domains.*;
// List all versions
var history = Domains.getVersions("a0729e98-e946-4e25-acde-10e8a2294ba1");
for (var version : history.getVersions()) {
System.out.println("Version: " + version);
}
// Get a specific version
var v1 = Domains.getSpecificVersion(
"a0729e98-e946-4e25-acde-10e8a2294ba1",
0.1
);
System.out.println("Description: " + v1.getDescription());
# List all versions
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions" \
-H "Authorization: Bearer {access_token}"
# Get a specific version
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1/versions/0.1" \
-H "Authorization: Bearer {access_token}"
{
"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 withentityType 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
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
404 | NOT_FOUND | Domain or version does not exist |
Was this page helpful?
⌘I