Get Bulk Task
Returns the progress of the indexing tasks in a bulk task. In this API a bulk task comes from Re-index Documents, and only the API key that started it can read it.
Items that Re-index Documents reported as not_found count as completed, so completed_items can equal total_items even when no document was re-indexed. Compare total_items with the number of queued items in that response to catch it. For the re-index flow, see Re-index and Track Indexing.
Authorization
Path parameters
…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.bulk_job_id of the Re-index Documents response. List Background Tasks also returns it, as the id of a document_bulk task. The id of a document_delete task from Delete Document is a deletion job ID: follow it with Get Deletion Job.Responses
not_found.items entries you kept from that response.Aggregate state:
running: at least one item is still in progress.completed: every item completed (reached at leastprojection_built, which comes beforepublished) or was reported asnot_found.failed: every item is terminal and at least one failed.canceled: every item is terminal, none failed, and at least one was canceled.
completed does not guarantee that the new revisions are active yet. When that matters, check each task with Get Indexing Task for stage: published, using the task IDs you kept from Re-index Documents.
document_reindex for bulk tasks from this API. document_upload and document_delete arise only from Dify operations. A deletion over this API answers with a deletion job, which is not a bulk task: follow it with Get Deletion Job or Get Deletion Batch.