Update rows in bulk: a value per row, or set/set_expr over a selector
POST
/collection/{id}/rows/update
Path Parameters
idstring
required·
Resource id
Request Body
allboolean
Possible values:
true
cursorstring
filter
limitinteger
qstring
row_idsstring[]
rowsobject[]
expected_versioninteger
fieldsobject
idstring
setobject
set_exprRecord<string, any>
JSONata per field, evaluated per row over { id, fields, created_at, updated_at }.
typecastboolean
Response Body
errorsobject[]
codestring
idstring
messagestring
next_cursorstring,null
unchangedinteger
updatedinteger
curl -X POST 'https://api.elaichi.ai/collection/<id>/rows/update' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"rows":[],"row_ids":[],"q":"your_q","all":true,"limit":0,"cursor":"your_cursor","set":{},"set_expr":{},"typecast":true}'const body = {
"rows": [],
"row_ids": [],
"q": "your_q",
"all": true,
"limit": 0,
"cursor": "your_cursor",
"set": {},
"set_expr": {},
"typecast": true
};
const response = await fetch('https://api.elaichi.ai/collection/<id>/rows/update', {
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/update"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"rows": [],
"row_ids": [],
"q": "your_q",
"all": True,
"limit": 0,
"cursor": "your_cursor",
"set": {},
"set_expr": {},
"typecast": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())