Skip to content
POST /collection/{id}/rows/{rowId}/restore

Writes a new version with op restore; nothing is rewritten. 409 row_version_conflict (with current_version) when expected_version is stale, 409 unique_key_conflict, 403 row_scope_violation, 404 version_not_found.

Path Parameters

idstring
required·

Resource id

rowIdstring
required·

Row id

Request Body

expected_versioninteger
versioninteger

Response Body

cleared_fieldsstring[]
dropped_fieldsstring[]
restored_frominteger
rowobject
curl -X POST 'https://api.elaichi.ai/collection/<id>/rows/<rowId>/restore' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"version":0,"expected_version":0}'
const body = {
  "version": 0,
  "expected_version": 0
};

const response = await fetch('https://api.elaichi.ai/collection/<id>/rows/<rowId>/restore', {
  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>/rows/<rowId>/restore"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "version": 0,
    "expected_version": 0
}

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