## List Directories

`client.Beta.Directories.List(ctx, query) (*PaginatedCursor[BetaDirectoryListResponse], error)`

**get** `/api/v1/beta/directories`

List Directories

### Parameters

- `query BetaDirectoryListParams`

  - `IncludeDeleted param.Field[bool]`

    Include deleted directories.

  - `Name param.Field[string]`

    Directory name to match.

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Type param.Field[BetaDirectoryListParamsType]`

    Directory type to include.

    - `const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"`

    - `const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"`

    - `const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"`

  - `Types param.Field[[]string]`

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

    - `const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"`

    - `const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"`

    - `const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"`

### Returns

- `type BetaDirectoryListResponse struct{…}`

  API response schema for a directory.

  - `ID string`

    Unique identifier for the directory.

  - `Name string`

    Human-readable name for the directory.

  - `ProjectID string`

    Project the directory belongs to.

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `Description string`

    Optional description shown to users.

  - `ExpiresAt Time`

    When this directory expires and is eligible for cleanup.

  - `SystemMetadata map[string, any]`

    Reserved system-managed metadata.

  - `Type BetaDirectoryListResponseType`

    Directory type: 'user', 'index', or 'ephemeral'.

    - `const BetaDirectoryListResponseTypeEphemeral BetaDirectoryListResponseType = "ephemeral"`

    - `const BetaDirectoryListResponseTypeIndex BetaDirectoryListResponseType = "index"`

    - `const BetaDirectoryListResponseTypeUser BetaDirectoryListResponseType = "user"`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

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

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

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "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": "ephemeral",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
