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 recursively. Empty means the repository root.

recursive
boolean

Accepted for API symmetry. Metadata listings are recursive regardless of this flag.

cursor
string

Pagination cursor returned by a previous list_files_with_metadata response.

limit
integer

Maximum number of files to return. A call with no limit and no cursor returns every file 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 200 files.

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

Whether ref should be resolved from the ephemeral namespace.

Response

The repository tree plus deduplicated commit metadata for the latest change touching each file.

Files in the repository at the resolved revision, each annotated with mode, type, and the latest commit that changed it.

commits
object
required

Commit metadata keyed by last_commit_sha so repeated commits are only sent once.

files
object[]
required

Files in the resolved revision, each annotated with the latest commit that changed it.

has_more
boolean
required

Whether another page is available.

Example:

true

ref
string
required

The resolved ref or commit used to generate the listing.

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"