Cancel Indexing
This method allows you to cancel an indexing for a knowledge base index.
Depending on the number of documents to be processed, an indexing can take a significant amount of time. If you discover that the processing of documents is not happening as you expect (e.g., a data source linked to the knowledge base of the index is misconfigured, and documents fail to be downloaded), it may be useful to cancel the processing of any remaining documents.
This method allows to do so, which stops the crawling of documents from
all data sources linked to the knowledge base of the index (unless the crawling
phase is already complete), it stops the processing of any documents that
have not yet been processed, and the backend marks each such document
with status=CANCELLED.
Note that cancelling is not immediate, as any pending document needs to updated as described above. For very large knowledge bases, even cancellation may take several minutes.
Once an indexing is cancelled and any remaining processing has been completed, the indexing status is updated according, and you can trigger a new indexing.
This method also allows forcing the immediate cancellation of an indexing, which merely marks an indexing as cancelled, which allows you to trigger a new indexing. You should never require to force-cancel an indexing, and you should always perform a "regular" cancellation prior to forcing it. Only use a forced cancellation if instructed to do so by PAIS support.
knowledge_base_id
index_id
indexing_id
force
Successful Response
{
"id": "string",
"created_at": 0,
"knowledge_base_id": "string",
"index_id": "string",
"completed_at": 0
}
ID of the indexing.
State of the indexing.
Unix timestamp (in seconds) when the indexing was created.
The ID of the knowledge base that is being indexed.
The ID of the index that is being indexed.
Unix timestamp (in seconds) when the indexing completed.
Invalid knowledge base, index or indexing ID.
Validation Error
"HTTPValidationError Object"
detail
curl -X POST -H 'Authorization: <value>' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}/indexings/{indexing_id}/cancel