Schema management

Retrieving schemas

All schemas

You can get a detailed list of all schemas in the business profile, paginated and, optionally, filtered by name (partial matches are returned). Pagination parameters are required.

API reference available here.

curl --location --request \
GET 'https://api.synerise.com/boxes-v2/schemas?page=1&limit=10&name=project' \
--header 'api-version: 4.2' \
--header 'authorization: Bearer eyJhbG...AQ298'

The response is a list of schemas with all the details for each schema.

To retrieve a simple list, with only schema names and UUIDs, you can use the following method:

API reference available here.

curl --location --request \
GET 'https://api.synerise.com/boxes-v2/schemas/projections?page=1&limit=10&name=project' \
--header 'api-version: 4.2' \
--header 'authorization: Bearer eyJh...re4vQ'

One schema

You can obtain the details of a single schema identified by the UUID.

API reference available here.

curl --location --request \
GET 'https://api.synerise.com/boxes-v2/schemas/94babf33-a30e-457b-a392-417264f3f31d' \
--header 'api-version: 4.2' \
--header 'authorization: Bearer eyJhb...cre4vQ'

Updating schemas

When updating a schema, the request body is the same as when creating the schema and the same fields are required, even if they are not being updated.

WARNING: If you send an empty field or omit a field, the existing values for that field are deleted/set to default.
Important:
  • When you update a schema by removing a data field, that field is automatically removed from existing records.
  • When you update a schema by adding a new data field, existing records are not automatically updated to include any value. If such a record is updated later, the field must be added.

API reference available here.

curl --location --request \
PUT 'https://api.synerise.com/boxes-v2/schemas/94babf33-a30e-457b-a392-417264f3f31d' \
--header 'api-version: 4.2' \
--header 'authorization: Bearer eyJ...3EWU' \
--header 'Content-Type: application/json' \
--data-raw '{   
    "schemaName": "Updating the schema name",
    "tags": ["sampleSchemas"]
    "fields": {
        "fullName": {
            "design": {
                "label": "Employee name",
                "hideLabel": false,
                "initialFocus": false,
                "description": "",
                "placeholder": "",
                "tabIndex": 0,
                "tooltip": ""
            },
            "layout": {
                "marginBottom": "0px",
                "marginLeft": "0px",
                "marginRight": "0px",
                "marginTop": "0px"
            },
            "type": "TEXT",
            "validation": {
                "errorMessage": "",
                "maximumLength": null,
                "minimumLength": null,
                "regexPattern": null,
                "required": true,
                "unique": false
            }
        }
    },
    "layout": [
        {
            "fieldName": "fullName",
            "type": "SINGLE"
        }
    ]
}'

The response is the updated schema.

Deleting schemas

WARNING: When you delete a schema, all its records are deleted!

API reference available here.

curl --location --request \
DELETE 'https://api.synerise.com/boxes-v2/schemas/537e1f16-7e66-405e-807e-85b48bf34c4b' \
--header 'api-version: 4.2' \
--header 'authorization: Bearer eyJh...cVz_U'

Schema documentation

API reference available here.

After you create a schema, you can download an OpenAPIv3 specification for that schema. This can be used, for example, to generate the code of your API client (using third-party tools).

curl --request GET 
  --url https://api.synerise.com/boxes-v2/documentation/537e1f16-7e66-405e-807e-85b48bf34c4b 
  --header 'Authorization: Bearer eyJh...cVz_U'
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.