Skip to content

List Indexes

client.beta.indexes.list(IndexListParams { organization_id, page_size, page_token, 2 more } query?, RequestOptionsoptions?): PaginatedCursor<IndexListResponse { id, export_config_id, name, 9 more } >
GET/api/v1/indexes

List indexes for the current project.

ParametersExpand Collapse
query: IndexListParams { organization_id, page_size, page_token, 2 more }
organization_id?: string | null
page_size?: number | null
page_token?: string | null
project_id?: string | null
source_directory_id?: string | null
ReturnsExpand Collapse
IndexListResponse { id, export_config_id, name, 9 more }

A searchable index over a directory of documents.

id: string

Unique identifier

export_config_id: string

ID of the export configuration.

name: string

Index name.

project_id: string

Project this index belongs to.

source_directory_id: string

ID of the source directory.

sync_config_id: string

ID of the sync configuration.

created_at?: string | null

Creation datetime

formatdate-time
description?: string | null

Index description.

last_exported_at?: string | null

Last export time.

formatdate-time
last_synced_at?: string | null

Last sync time.

formatdate-time
metadata?: Record<string, unknown>

Build state and diagnostic info.

updated_at?: string | null

Update datetime

formatdate-time

List Indexes

import LlamaCloud from '@llamaindex/llama-cloud';

const client = new LlamaCloud({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const indexListResponse of client.beta.indexes.list()) {
  console.log(indexListResponse.id);
}
{
  "items": [
    {
      "id": "id",
      "export_config_id": "export_config_id",
      "name": "name",
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "sync_config_id": "sync_config_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "last_exported_at": "2019-12-27T18:11:19.117Z",
      "last_synced_at": "2019-12-27T18:11:19.117Z",
      "metadata": {
        "foo": "bar"
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "export_config_id": "export_config_id",
      "name": "name",
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "sync_config_id": "sync_config_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "last_exported_at": "2019-12-27T18:11:19.117Z",
      "last_synced_at": "2019-12-27T18:11:19.117Z",
      "metadata": {
        "foo": "bar"
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}