GET /api/v1/cloud/files
Retrieves files under the current account.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of files per page. Default 20, range 1-100. Values above 100 return 400 invalid_request_error. |
page | string | No | Claude-style forward cursor. Equivalent to after_id; mutually exclusive with before_id and after_id |
after_id | string | No | Cursor pagination: return files after this ID. Mutually exclusive with page and before_id |
before_id | string | No | Cursor pagination: return files before this ID. Mutually exclusive with page and after_id |
name | string | No | Case-insensitive prefix search on file name |
scope_id | string | No | Filter files associated with a resource scope, currently a Session ID |
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
data | array | Array of File objects |
next_page | string | null | Forward cursor for the next page; use as page when has_more is true |
first_id | string | null | ID of the first file on the current page; null when data is empty |
last_id | string | null | ID of the last file on the current page; null when data is empty |
has_more | boolean | Whether more files are available |
Pagination
Results are sorted bycreated_at and id. To page through files:
- Make the first request with
limitto fetch the first page. - If
has_moreistrue, usepage=<next_page>to fetch the next page. - Use
before_id=<first_id>to page backward.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Invalid limit, or more than one of page, before_id, and after_id is provided |
| 401 | authentication_error | Missing or invalid authentication token |
Related
Attach and download files
Upload files to give your agent context, and download files it produces.