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
| Name | In | Type | Description |
|---|---|---|---|
name | path | string · required | Index name. |
Idempotency-Key | header | string · required |
Request body
application/json
| Field | Type | Description |
|---|---|---|
ids | array<string> · required | The ids to delete. |
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: 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"]}'