Get Index

Get Index

This method allows you to retrieve the configuration of an index identified by its ID.

The response also contains metadata, such as how many documents have been added to the index, or what is the status of the index. The status of an index is determined by the status of the embedding model; if the model becomes unavailable, the status of the index is updated. The details are reflected in the status_errors.

Request
URI
GET
https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}
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 Index of type(s) application/json
{
    "id": "string",
    "name": "string",
    "description": "string",
    "embeddings_model_endpoint": "string",
    "text_splitting": "string",
    "chunk_size": 0,
    "chunk_overlap": 0,
    "knowledge_base_id": "string",
    "object": "string",
    "created_at": 0,
    "last_indexed_at": 0,
    "last_indexed_by_id": "string",
    "num_documents": 0,
    "status": "string",
    "status_errors": [
        "string"
    ]
}
string As uuid As uuid
id
Required

ID of the index.

string
name
Optional
Constraints: maxLength: 256

Name of the index.

string
description
Optional

Description of the index.

string
embeddings_model_endpoint
Required

ID of the model to be used by the index for generating embeddings.

string
text_splitting
Required

Method for chunking text for embedding

integer
chunk_size
Required
Constraints: minimum: 100

Maximum size (in tokens) of the text chunks. This must be at least 100 to accomodate for content metadata embedded alongside each chunk of text.

integer
chunk_overlap
Optional
Constraints: minimum: 0 default: 0

Size of the chunk overlap (in tokens) when splitting text.

string As uuid As uuid
knowledge_base_id
Required

ID of the knowledge base of the index.

string
object
Optional
Constraints: default: index

Object type, which is always index.

integer
created_at
Required

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

integer
last_indexed_at
Optional

Unix timestamp (in seconds) when the index contents were last indexed.

string As uuid As uuid
last_indexed_by_id
Optional

ID of the most recent indexing job that affected this index.

integer
num_documents
Optional
Constraints: minimum: 0 default: 0

Total number of documents in the index.

string
status
Required

Availability status of the index.

Possible values are : AVAILABLE, ERROR,
array of string
status_errors
Optional

Details of the index error status, if the index is not available.

Possible values are : AGENT_ID_NOT_FOUND, FAILED_TO_PAGINATE_LIST, AGENT_SESSION_ID_NOT_FOUND, INDEX_NOT_FOUND, INDEX_NOT_REACHABLE, ROUTE_TO_MODEL_NOT_FOUND, INVALID_MODEL_TYPE_FOR_AGENT, AGENT_SESSION_EXPIRED, UNEXPECTED_MODEL, INVALID_RESPONSE_FROM_MODEL_ENDPOINT, INVALID_INFERENCE_REQUEST_FOR_MODEL_TYPE, DISALLOWED_ROLE, VALIDATION_ERROR, MAX_LENGTH_METADATA_REACHED, INVALID_AGENT_ATTRIBUTE, KNOWLEDGE_BASE_INVALID_STATE, DATA_SOURCE_NOT_FOUND, DATA_SOURCE_STILL_LINKED_TO_KNOWLEDGE_BASE, KNOWLEDGE_BASE_NOT_FOUND, DOCUMENT_NOT_FOUND, EMPTY_DOCUMENT_FILE, DOCUMENT_EXCEEDS_MAX_UPLOAD_SIZE, INDEXING_NOT_FOUND, NO_ACTIVE_INDEXING, ERROR_NOT_FOUND, INDEX_FOR_KNOWLEDGE_BASE_ALREADY_EXISTS, UNSUPPORTED_CONFIGURATION, PENDING_INDEXING_ALREADY_EXISTS_FOR_KB, CREATING_INDEXING_FOR_LOCAL_FILES_KB_NOT_ALLOWED, KNOWLEDGE_BASE_DATA_SOURCE_NOT_UNLINKING, KNOWLEDGE_BASE_DATA_SOURCE_NOT_FOUND, KNOWLEDGE_BASE_DATA_SOURCE_ALREADY_EXISTS, KNOWLEDGE_BASE_LINK_DATA_SOURCE_NOT_SUPPORTED, KNOWLEDGE_BASE_UPLOAD_NOT_SUPPORTED_FOR_DATA_SOURCE, KNOWLEDGE_BASE_DELETE_NOT_SUPPORTED_FOR_DATA_SOURCE, KNOWLEDGE_BASE_DELETE_NOT_SUPPORTED_WHILE_AGENT_IS_LINKED, KNOWLEDGE_BASE_DELETE_CONFLICT, DOCUMENT_NOT_IN_DELETABLE_STATE, COMPLETION_MODEL_ENDPOINT_UNAVAILABLE, EMBEDDING_MODEL_ENDPOINT_UNAVAILABLE, EMBEDDING_MODEL_ENDPOINT_BAD_TYPE,

404

Invalid or mismatched knowledge base or index ID.

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}