iQ Suite - Docs
SDK ReferenceDocument RAG

List Index

Retrieve a list of all indexes associated with your account.

Description

The index endpoint allows you to retrieve a list of all indexes that have been created under your account.

HTTP Request

GET /index

Authentication

All requests must include an Authorization header with a valid API key.

Headers

KeyValue
AuthorizationBearer YOUR_API_KEY
Content-Typeapplication/json

Request Example

try:
    indices = client.list_indexes()
    if not indices:
        print("No indices found.")
    else:
        for index in indices:
            index_id = getattr(index, 'id', None)
            if index_id:
                print(f"Index ID: {index_id}")
            else:
                print("Encountered an index without an ID.")
                
except APIError as e:
    print(f"An API error occurred while listing indexes: {e}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

Response

Success

Status Code: 200 OK

Body:

{
   "data": [
       {
           "id": "54a7e942-366b-42d2-9672-69fc460c2752",
           "documents": [
               {
                   "id": "1d4b3cb2-764d-42c0-b242-71a0edbf47c7",
                   "file_name": "textract_graphs-1.pdf", 
                   "created_at": "2025-01-06T19:33:00.000000Z",
                   "updated_at": "2025-01-06T20:03:01.000000Z"
               }
           ]
       }
   ]
}

On this page