Skip to content

List Directories

client.Beta.Directories.List(ctx, query) (*PaginatedCursor[BetaDirectoryListResponse], error)
GET/api/v1/beta/directories

List Directories

ParametersExpand Collapse
query BetaDirectoryListParams
IncludeDeleted param.Field[bool]optional

Include deleted directories.

Name param.Field[string]optional

Directory name to match.

OrganizationID param.Field[string]optional
PageSize param.Field[int64]optional
PageToken param.Field[string]optional
ProjectID param.Field[string]optional
Type param.Field[BetaDirectoryListParamsType]optional

Directory type to include.

const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"
const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"
const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"
Types param.Field[[]string]optional

Filter by one or more directory types. Repeat the parameter for multiple values.

const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"
const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"
const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"
ReturnsExpand Collapse
type BetaDirectoryListResponse struct{…}

API response schema for a directory.

ID string

Unique identifier for the directory.

Name string

Human-readable name for the directory.

minLength1
ProjectID string

Project the directory belongs to.

CreatedAt Timeoptional

Creation datetime

formatdate-time
DeletedAt Timeoptional

Optional timestamp of when the directory was deleted. Null if not deleted.

formatdate-time
Description stringoptional

Optional description shown to users.

ExpiresAt Timeoptional

When this directory expires and is eligible for cleanup.

formatdate-time
SystemMetadata map[string, any]optional

Reserved system-managed metadata.

Type BetaDirectoryListResponseTypeoptional

Directory type: ‘user’, ‘index’, or ‘ephemeral’.

One of the following:
const BetaDirectoryListResponseTypeUser BetaDirectoryListResponseType = "user"
const BetaDirectoryListResponseTypeIndex BetaDirectoryListResponseType = "index"
const BetaDirectoryListResponseTypeEphemeral BetaDirectoryListResponseType = "ephemeral"
UpdatedAt Timeoptional

Update datetime

formatdate-time

List Directories

package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloudprod.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Directories.List(context.TODO(), llamacloudprod.BetaDirectoryListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "id": "id",
      "name": "x",
      "project_id": "project_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "expires_at": "2019-12-27T18:11:19.117Z",
      "system_metadata": {
        "foo": "bar"
      },
      "type": "user",
      "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",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "expires_at": "2019-12-27T18:11:19.117Z",
      "system_metadata": {
        "foo": "bar"
      },
      "type": "user",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/python/shared/mcp/