Skip to main content

List Versions

List all published versions of a schema graph class ordered by version number descending with field definitions for each version.

Retrieve the complete version history of a schema graph class. Each version captures a snapshot of the class's JSON Schema definition and its associated field registry IDs at the time the version was published. Versions are created when diffs are approved, and version numbers increment monotonically.

GET/v1/schema-graph/classes/{id}/versions

Response

Response fields

dataarrayArray of version objects.
data[].idstringVersion UUID.
data[].schema_class_idstringParent schema class UUID.
data[].version_numberintegerVersion number (monotonically increasing).
data[].json_schemaobjectJSON Schema definition for this version.
data[].field_idsarrayArray of field registry UUIDs included in this version.
data[].created_atstringISO 8601 creation timestamp.

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

401unauthorizedMissing or invalid API key.
404not_foundNo schema class with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

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. This is useful for auditing how a class evolved after a diff was approved, or for building a changelog UI that shows added and removed fields per version.