Skip to main content
post/knowledge-fs/spaces/{knowledge_base_id}/documents/reindex
Request example
Response
post/knowledge-fs/spaces/{knowledge_base_id}/documents/reindex

Authorization

Authorizationstringheaderrequired#

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path parameters

knowledge_base_idstringrequired#
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.

Headers

Idempotency-Keystring#

Send a key on every call. It makes the call safe to retry. Use 8 to 255 printable ASCII characters without leading or trailing whitespace; a malformed key answers 400.

Repeating the same key and body returns the original bulk task instead of starting new indexing tasks. Reusing the key with a different body, from another API key, in another knowledge base, or for another operation answers 409.

Length: 8–255

Body

application/json

Responses

application/json
The indexing tasks were queued.
bulk_job_idstring#
Bulk task ID. Poll it with Get Bulk Task.
itemsobject[]#
One entry per distinct ID sent, in request order, followed by one entry per selected file when all is true. IDs that resolve to the same document file share one entry.
totalinteger#
Number of entries in items.