Get Active Indexing

Get Active Indexing

This method allows you to identify which indexing contains the most relevant data for a particular index.

The indexing that is considered "most relevant" for a given index is the indexing that is actively running (i.e., the backend is processing documents), or the most recently completed indexing, if no indexing is running or has been queued.

If no indexing is actively running or has been completed yet, the oldest pending indexing (if any) is considered to be the "most relevant".

You can use this method to identify which indexing to choose for determining the indexing status of a knowledge base index. The same can be accomplished by listing all indexings of a knowledge base index, but it abstracts away the logic of identifying which indexing you want to monitor.

Note that the returned indexing can change over time, as indexings complete and queued indexings are started.

Request
URI
GET
https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}/active-indexing
COPY
Path Parameters
string
knowledge_base_id
Required

knowledge_base_id

string
index_id
Required

index_id


Authentication
This operation uses the following authentication methods.
Responses
200

Successful Response

Returns Indexing of type(s) application/json
{
    "id": "string",
    "created_at": 0,
    "knowledge_base_id": "string",
    "index_id": "string",
    "completed_at": 0
}
string As uuid As uuid
id
Required

ID of the indexing.

state
Required

State of the indexing.

integer
created_at
Required

Unix timestamp (in seconds) when the indexing was created.

string As uuid As uuid
knowledge_base_id
Required

The ID of the knowledge base that is being indexed.

string As uuid As uuid
index_id
Required

The ID of the index that is being indexed.

integer
completed_at
Optional

Unix timestamp (in seconds) when the indexing completed.


404

Invalid knowledge base or index, or the indexing does not have any indexing.

Operation doesn't return any data structure

422

Validation Error

Returns HTTPValidationError of type(s) application/json
"HTTPValidationError Object"
array of object
detail
Optional

detail


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}/active-indexing