List Directories
client.beta.directories.list(DirectoryListParams { data_source_id, include_deleted, name, 4 more } query?, RequestOptionsoptions?): PaginatedCursor<DirectoryListResponse { id, name, project_id, 5 more } >
GET/api/v1/beta/directories
List Directories
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 directoryListResponse of client.beta.directories.list()) {
console.log(directoryListResponse.id);
}{
"items": [
{
"id": "id",
"name": "x",
"project_id": "project_id",
"created_at": "2019-12-27T18:11:19.117Z",
"data_source_id": "data_source_id",
"deleted_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}Returns Examples
{
"items": [
{
"id": "id",
"name": "x",
"project_id": "project_id",
"created_at": "2019-12-27T18:11:19.117Z",
"data_source_id": "data_source_id",
"deleted_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}