Skip to content
POST /collection/{id}/schema

Atomic op batch. dry_run previews; a lossy change needs accept_data_loss.

Path Parameters

idstring
required·

Resource id

Request Body

accept_data_lossboolean
dry_runboolean
expected_versioninteger
opsarray

Response Body

collectionobject
access_summary
access_viastring
can_manageboolean
can_revoke_shareboolean
can_see_sharesboolean
can_shareboolean
can_transferboolean
can_useboolean
created_atstring
descriptionstring
field_countinteger
hidden_field_keysstring[]
idstring
namestring
owner_avatar_urlstring,null

The person's picture: their stored profile picture, else a Gravatar URL (d=404, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.

owner_display_namestring,null
owner_user_idstring
reference_countsobject
2 properties
automationsinteger
dashboardsinteger
row_scope_fieldstring,null
row_visibilitystring
Possible values:
allown
schemaobject
5 properties
fieldsobject[]
8 properties
descriptionstring
idstring
indexedboolean
keystring
namestring
options
requiredboolean
typestring
primary_fieldstring
row_scopeobject,null
unique_keyarray,null
versioninteger
schema_versioninteger
statsobject,null
4 properties
as_ofstring,null
bytesinteger
data_versioninteger
row_countinteger
updated_atstring
reportobject
changesarray
dry_runboolean
from_versioninteger
requires_accept_data_lossboolean
schemaobject
5 properties
fieldsobject[]
8 properties
descriptionstring
idstring
indexedboolean
keystring
namestring
options
requiredboolean
typestring
primary_fieldstring
row_scopeobject,null
unique_keyarray,null
versioninteger
to_versioninteger
curl -X POST 'https://api.elaichi.ai/collection/<id>/schema' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"expected_version":0,"ops":[],"accept_data_loss":true,"dry_run":true}'
const body = {
  "expected_version": 0,
  "ops": [],
  "accept_data_loss": true,
  "dry_run": true
};

const response = await fetch('https://api.elaichi.ai/collection/<id>/schema', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/collection/<id>/schema"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "expected_version": 0,
    "ops": [],
    "accept_data_loss": True,
    "dry_run": True
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())