Skip to main content
GET
Get Document Indexing Task

Authorizations

Authorization
string
header
required

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_id
string<uuid>
required

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.

document_id
string<uuid>
required

The document ID, from List Documents.

task_id
string<uuid>
required

Indexing task ID: latest_task.id from Get Document or List Documents, or id from List Document Indexing Tasks. The task must belong to this document.

Response

The indexing task.

active_operations
string[] | null

Operations under way in the current phase, such as parse, chunk, embedding, or publication.

completed_at
string | null

When the task ended, ISO 8601. null while it runs.

created_at
string

When the task was created, ISO 8601. Get Indexing Task reports the same task's times in epoch milliseconds.

document_id
string

Document ID.

document_revision
integer

Revision this task builds.

error_code
string | null

Error code when state is failed.

error_message
string | null

The message for error_code. Can differ from failure.message.

failure
object | null

Error details when state is failed. stage is the phase the task failed in, and traceId is the task ID. null otherwise.

id
string

Indexing task ID. The same ID works with Get Indexing Task, Cancel Indexing Task, and Retry Indexing Task.

knowledge_space_id
string

Internal ID of the knowledge base. Not the knowledge base ID in the path.

phase
string | null

What the task is doing: queued, parsing, outline_summary, chunking_indexing, graph_admission, publication, or complete.

progress_percent
integer

Progress from 0 to 100, derived from stage.

retry_at
string | null

When the automatic retry runs, ISO 8601. Set while state is retry_wait.

semantic_enrichment
object | null

Knowledge graph building status for the indexed content. Deep and Research searches follow the knowledge graph. When building wasn't scheduled, state is not_scheduled while the task runs and disabled once it has ended.

stage
string

Last checkpoint reached, in forward order: queued, parsed, outline_built, nodes_generated, projection_built, smoke_eval_passed, published. It stays at the last checkpoint when the task fails or is canceled, so read state for the outcome.

state
string

Run state:

  • dispatch_pending, queued: waiting for a worker.
  • retry_wait: an automatic retry is scheduled at retry_at.
  • running: a worker is indexing.
  • succeeded: the revision is published and serves queries. semantic_enrichment can still be running.
  • failed: see failure. Restart it with Retry Indexing Task.
  • canceled.
  • superseded: a newer attempt replaced this one.

succeeded, failed, canceled, and superseded are terminal.

updated_at
string

When the task or its enrichment last changed, ISO 8601.