Skip to main content
post/knowledge-fs/spaces/{knowledge_base_id}/jobs/{task_id}/retry
Request example
Response
post/knowledge-fs/spaces/{knowledge_base_id}/jobs/{task_id}/retry

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.
task_idstringrequired#
Indexing task ID, the same in every place it appears: compilation_job.id of a queued item in the Re-index Documents response, latest_task.id from Get Document, id from List Document Indexing Tasks, and the id of a document task in List Background Tasks.

Responses

application/json
The restarted task. run_state is dispatch_pending, and error and completed_at are null.
base_head_revisioninteger#
Internal. Not needed to follow the task.
candidate_fingerprintstring#
Internal. Not needed to follow the task.
candidate_publication_idstring#
Internal. Not needed to follow the task.
completed_atnumber#
When the task reached a terminal stage, in epoch milliseconds. null while it runs and after a retry.
created_atnumber#
When the task was created, in epoch milliseconds.
document_asset_idstring#
ID of the document file being indexed. Usable with Get Document File. It is the asset.id of the Re-index Documents item that started the task, even when you submitted a document ID.
errorstring#
Short failure message. Can differ from failure.message. Set only when stage or run_state is failed. Otherwise null, including on canceled tasks.
execution_attemptsinteger#
Attempts made so far. Retry Indexing Task resets it to 0, so repeated retries never exhaust the attempt budget on their own.
failureobject#
Error details when the task failed. null otherwise.
idstring#
Indexing task ID.
knowledge_space_idstring#
Internal ID of the knowledge base. Not the knowledge base ID in the path.
max_execution_attemptsinteger#
Attempts allowed before the task fails.
run_statestring#

Scheduler state of the current attempt:

  • dispatch_pending: accepted, waiting to be dispatched to a worker.
  • queued: dispatched, waiting for a worker.
  • running: a worker is executing the task.
  • retry_wait: an automatic retry is scheduled, and stage stays unchanged.
  • succeeded: accompanies stage: published.
  • failed, canceled: terminal.
  • superseded: a newer attempt replaced this one. Terminal, reported with stage: canceled, and accepted by neither cancel nor retry.

null when not set. Retry Indexing Task sets it to dispatch_pending.

stagestring#

Indexing stage, in forward order:

  • queued
  • parsed
  • outline_built
  • nodes_generated
  • projection_built
  • smoke_eval_passed
  • published

published means the new revision is active. failed and canceled are the other terminal values. Retry Indexing Task keeps the checkpoint the attempt had reached, so the value is rarely queued after a retry.

updated_atnumber#
When the task last changed, in epoch milliseconds.
versioninteger#
Version of the document file being indexed.