## List Attachments

`client.Beta.Attachments.List(ctx, query) (*PaginatedCursor[BetaAttachmentListResponse], error)`

**get** `/api/v1/beta/attachments`

List the attachments associated with a file (e.g. per-page screenshots).

### Parameters

- `query BetaAttachmentListParams`

  - `SourceID param.Field[string]`

    File UUID or directory file ID (dfl-...).

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaAttachmentListResponse struct{…}`

  Metadata for a single file attachment.

  - `Name string`

    Name of the attachment

  - `Size int64`

    Size of the attachment in bytes

  - `LastModified Time`

    When the attachment was last modified

### 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.Attachments.List(context.TODO(), llamacloud.BetaAttachmentListParams{
    SourceID: "source_id",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "name": "name",
      "size": 0,
      "last_modified": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
