Skip to main content
GET
TypeScript

Authorizations

Authorization
string
header
required

JWT bearer token signed with your organization's registered signing key. There is no OAuth authorization server; you mint tokens yourself and the token's scopes claim carries the granted permission scopes. Public scopes: git:read (read repository contents), git:write (write branches, commits, tags, and notes), repo:write (create and manage repositories), org:read (list an organization's repositories). Each operation's security requirement names the scopes it requires. See https://code.storage/docs/getting-started/authentication for how to mint tokens.

Path Parameters

repo_name
string
required

The repository name, for example acme/web.

Query Parameters

ref
string

Optional branch, tag, or commit SHA to list from. When omitted, the repository default branch is used.

path
string

Optional repository-relative subtree to list. Empty means the repository root.

recursive
boolean
default:true

When true, include descendants recursively. When false, only direct children are returned. Defaults to true.

cursor
string

Pagination cursor returned by a previous list_files response.

limit
integer

Maximum number of paths to return. A call with no limit and no cursor returns every path in one response, with has_more false. A limit of 0 is the same as no limit. A call with a cursor and no limit returns up to 1000 paths.

Required range: 0 <= x <= 5000
ephemeral
boolean

Whether ref should be resolved from the ephemeral namespace.

Response

Tree entries for the resolved revision.

Paginated tree entries in the repository at the resolved revision.

entries
object[]
required

Tree entries for the resolved revision.

has_more
boolean
required

Whether another page is available.

Example:

true

paths
string[]
required

Flat blob-only path list. Mirrors the path of every entry whose type is "blob". Convenience shape for callers that just want file paths; use entries when you need type/mode.

Repository-relative path used to scope the operation.

Example:
ref
string
required

The resolved reference (branch name or commit SHA) that was used.

Example:

"main"

next_cursor
string

Opaque cursor for the next page. Pass it as cursor to read the next page. Absent when there are no more results.

Example:

"MTcwNzU3MzQ1MTAwMDAwMDAwMHxyZXBvXzlhNGMyMWY"