Skip to main content
GET
/
public
/
v1
/
projects
/
{projectId}
/
schemas
/
{schemaId}
/
versions
List schema versions
curl --request GET \
  --url https://api.synthbrew.com/api/public/v1/projects/{projectId}/schemas/{schemaId}/versions \
  --header 'x-api-key: <api-key>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": 123,
    "schema": {
      "entities": [
        {
          "id": "<string>",
          "fields": [
            {
              "id": "<string>",
              "label": "<string>",
              "description": "<string>",
              "nullable": false,
              "references": {
                "entity": "<string>",
                "field": "<string>",
                "relation": "many-to-one",
                "pick": "random",
                "onDelete": "restrict",
                "onUpdate": "restrict"
              },
              "generation": {
                "emptyRate": 0,
                "uniqueValues": true,
                "strategy": {}
              },
              "minLength": 1,
              "maxLength": 2,
              "min": 123,
              "max": 123,
              "precision": 2,
              "prefix": "<string>",
              "suffix": "<string>",
              "trueRate": 0.5,
              "weekdaysOnly": false,
              "values": [
                "<string>"
              ],
              "weights": [
                123
              ]
            }
          ],
          "label": "<string>",
          "description": "<string>",
          "primaryKey": [
            "<string>"
          ],
          "uniqueKeys": [
            [
              "<string>"
            ]
          ],
          "indexes": [
            {
              "fields": [
                "<string>"
              ],
              "id": "<string>",
              "unique": false
            }
          ],
          "generation": {
            "rowCount": 1,
            "locale": "<string>",
            "timezone": "<string>",
            "seed": "<string>"
          }
        }
      ],
      "metadata": {
        "name": "<string>",
        "description": "<string>",
        "tags": [
          "<string>"
        ]
      },
      "generationDefaults": {
        "rowCount": 1,
        "locale": "<string>",
        "timezone": "<string>",
        "seed": "<string>"
      }
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
]

Documentation Index

Fetch the complete documentation index at: https://synthbrew.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Team API key created under /api/api-keys. Prefix: sb_api_.

Path Parameters

projectId
string<uuid>
required

Project UUID in the team associated with the API key.

schemaId
string<uuid>
required

Schema UUID that belongs to the provided project.

Response

Schema versions

id
string<uuid>
schemaId
string<uuid>
version
integer
schema
object

Declarative schema config used by schema versions. This is the v1 public contract when paired with schemaConfigVersion="v1" and formatVersion=1.

createdAt
string<date-time>
updatedAt
string<date-time> | null