Skip to main content
GET
List files

Authorizations

Authorization
string
header
required

An API token for one organization. You create and revoke tokens in the dashboard. A token scoped to one App can reach only that App, so give that kind of token to an agent. An organization-wide token can create a short-lived one with POST /api/tokens.

Scopes

apps:read
OAuth

See the organization's Apps, with their files, deployments, and logs.

apps:read
DPoP

Path Parameters

id
string
required

A unique ID that starts with app_.

Pattern: ^app_[0-9A-Za-z]{24}$
Example:

"app_Zj7XhMgplmTJcp5Dk4vcYuk0"

Query Parameters

limit
integer
default:50

The maximum number of files to return.

Required range: 1 <= x <= 100
cursor
string

Where to start: the next_cursor of the page before, listed with the same sort. Without it, the list starts with the first files.

Required string length: 1 - 4096
sort
string
default:path

A comma-separated list of fields to sort by: path or size. Each field sorts ascending. To sort a field descending, prefix it with -. Ties are sorted by path.

path
string

Returns only files whose path contains this text, ignoring case.

Required string length: 1 - 200
content
string

Returns only files whose content contains this text, ignoring case.

Required string length: 1 - 200
glob
string

Returns only files whose path matches this glob, from the App's root. * matches within one folder, ** matches across folders, ? matches one character, [abc] matches one of a set, and {ts,tsx} matches any of its alternatives, as in src/**/*.{ts,tsx}. Without a leading **/, a glob matches only from the root: *.json matches package.json but not src/data.json.

Required string length: 1 - 200
pattern
string

Returns only files with a line that this regular expression matches, in Perl syntax. Matching is case-sensitive; to ignore case, start the expression with (?i). Can't be combined with content.

Required string length: 1 - 200

Response

One page of files.

results
object[]
required

The results in this page.

has_more
boolean
required

True if more results follow this page; false otherwise.

next_cursor
string | null
required

Where the next page starts: to get it, list again with this value as cursor. A cursor from the last page later finds results added after it. Null if the list is empty.