Skip to Content
Open Retainer
Schema

Request a schema change

POST
/v1/schema/changes

Submit schema operations. Changes that need review are proposed for a workspace administrator. Requires the schema:write scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Request Body

application/json
  1. body
operations*array<||||||||||>
Items1 <= items <= 100
reason?string
Lengthlength <= 2000

Response Body

The schema change was applied or made no changes.

application/json
  1. response
status*string
Value in"applied""proposed""rejected""failed""unchanged"
change*|null
schemaVersion*integer
Range-9007199254740991 <= value <= 9007199254740991
recordIds?array<>
Example Request
curl -X POST 'https://retainer.tamloot.cc/v1/schema/changes' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "operations": [    {      "op": "create_object",      "object": {        "nameSingular": "string",        "namePlural": "string",        "labelSingular": "string",        "labelPlural": "string"      }    }  ]}'
Example Response
{  "status": "applied",  "change": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "applied",    "operations": [      {        "kind": "create_object",        "object": {          "nameSingular": "string",          "namePlural": "string",          "labelSingular": "string",          "labelPlural": "string",          "description": "string",          "labelField": "string",          "class": "entity",          "owner": "system",          "isProtected": true,          "universalId": "47b43539-a01b-4328-9f99-1680f7644e61",          "labelFieldLabel": "string"        }      }    ],    "request": [      {        "op": "create_object",        "object": {          "universalId": "47b43539-a01b-4328-9f99-1680f7644e61",          "class": "entity",          "nameSingular": "string",          "namePlural": "string",          "labelSingular": "string",          "labelPlural": "string",          "description": "string",          "labelField": "string",          "fields": []        }      }    ],    "isDestructive": true,    "template": "string",    "reason": "string",    "requestedBy": {      "via": "string",      "type": "user",      "id": "string",      "name": "string"    },    "decidedBy": {      "via": "string",      "type": "user",      "id": "string",      "name": "string"    },    "appliedVersion": -9007199254740991,    "error": "string",    "createdAt": "2019-08-24T14:15:22Z",    "decidedAt": "2019-08-24T14:15:22Z"  },  "schemaVersion": -9007199254740991,  "recordIds": [    "3afd324f-58d9-4fb7-a1d0-205823dcdf21"  ]}