List Versions
List every published version of a schema graph class, newest first. Each version snapshots the JSON Schema definition and field registry IDs at publish time.
A class version is an immutable snapshot of a schema graph class at one point in its evolution: the JSON Schema definition of its fields plus the field registry IDs it referenced when published. This endpoint returns the complete version history of a class, ordered by version number descending, so the first item is always the current structure.
Versions are published by the platform as the ontology evolves: when new documents introduce fields or change field types, schema generation produces a new snapshot and version numbers increment monotonically. Each transition between consecutive versions is also recorded as a diff you can review via the diffs endpoints.
/v1/schema-graph/classes/{id}/versionscurl
Response
Response fields
Response
{
"data": [
{
"id": "ver-uuid-3",
"schema_class_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"json_schema": {
"type": "object",
"properties": {
"invoice_number": { "type": "string" },
"vendor": { "type": "string" },
"total": { "type": "number" }
}
},
"field_ids": ["field-uuid-1", "field-uuid-2", "field-uuid-3"],
"created_at": "2024-09-01T00:00:00.000Z"
}
]
}Errors
Error responses
Compare two versions by fetching them individually with GET /v1/schema-graph/classes/{id}/versions/{version} and diffing their json_schema and field_ids arrays, or read the precomputed change record from GET /v1/schema-graph/diffs?schema_class_id={id}. This is useful for auditing how a class evolved, or for building a changelog UI that shows added and removed fields per version.