iQ Suite - Docs
SDK ReferenceDocument RAG

List Documents

Retrieve all documents within a specific index.

Description

The /index/get-all-documents endpoint allows you to retrieve a list of all documents within a specified index.

HTTP Request

GET /index/get-all-documents

Authentication

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

Headers

KeyValue
AuthorizationBearer YOUR_API_KEY
Content-Typeapplication/json

Query Parameters

ParameterTypeDescription
indexstringThe ID of the index to query

Request Example

try:
    documents = client.get_documents('your_index_id')
    for doc in documents.data.documents:
        print(f"Document ID: {doc.id}")
        print(f"Created At: {doc.created_at}")
        print(f"Updated At: {doc.updated_at}")
        print(f"Index ID: {documents.data.index}")
        print("---")
except (APIError, Exception) as e:
    print({'error': str(e)})

Response

Success

Status Code: 200 OK

Body:

{
   "data": {
       "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