Skip to content

Delete rows by id, or one page of the rows a selector matches (one table)

POST /collection/{id}/table/{tableKey}/rows/delete

Path Parameters

idstring
required·

Resource id

tableKeystring
required·

Table key; main is the default table.

Request Body

allboolean
Possible values:
true
cursorstring
filter
limitinteger
qstring
row_idsstring[]
curl -X POST 'https://api.elaichi.ai/collection/<id>/table/<tableKey>/rows/delete' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"row_ids":[],"q":"your_q","all":true,"limit":0,"cursor":"your_cursor"}'
const body = {
  "row_ids": [],
  "q": "your_q",
  "all": true,
  "limit": 0,
  "cursor": "your_cursor"
};

const response = await fetch('https://api.elaichi.ai/collection/<id>/table/<tableKey>/rows/delete', {
  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>/table/<tableKey>/rows/delete"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "row_ids": [],
    "q": "your_q",
    "all": True,
    "limit": 0,
    "cursor": "your_cursor"
}

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