Skip to main content
POST
Archive

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.

Body

application/json

Request a .tar.gz snapshot of the repository at a branch, tag, or commit. Include and exclude globs let you shape the archive before it streams back.

Archive options describing the ref to snapshot and the include or exclude filters applied to the resulting tarball.

ref
string
required

Branch, tag, or commit to archive. When omitted, the default branch or HEAD is used.

archive
object

Optional archive output settings.

exclude_globs
string[]

Exclude files matching these glob patterns after include filtering.

Glob pattern such as node_modules/**.

include_globs
string[]

Only include files matching these glob patterns.

Glob pattern such as src/**/*.go.

max_blob_size
integer<int64>

Maximum blob size to include in the archive, in bytes.

Response

A streamed .tar.gz archive of the resolved revision.

Gzip-compressed tar archive stream.