Galon Cloud
Galon API v1

/search/indexes/{name}/documents/delete

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

POST /search/indexes/{name}/documents/delete

Delete documents

Delete up to 1,000 documents of an index by id. Use when records were deleted in the app. Before: the ids to remove. Returns the task: deleted and not_found counts. Scope: search:write.

API key (Bearer), on the public API endpoint.

Parameters

NameInTypeDescription
namepathstring · requiredIndex name.
Idempotency-Keyheaderstring · required

Request body

application/json

FieldTypeDescription
idsarray<string> · requiredThe ids to delete.

Responses

StatusDescriptionBody
2XXSuccess: the JSON body the route returns (see the description for its fields).object
401Key missing or invalidError
4XXRefused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).Error

Examples

curl

curl -X POST "$GALON_API_BASE/search/indexes/<name>/documents/delete" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Idempotency-Key: <unique-key>" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["string"]}'