Skip to main content
POST
/
api
/
v1
/
repos
/
archive
Archive
curl --request POST \
  --url https://api.{cluster}.code.storage/api/v1/repos/archive \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "archive": {
    "prefix": "sdk-docs/"
  },
  "exclude_globs": [
    "**/drafts/**"
  ],
  "include_globs": [
    "docs/**",
    "README.md"
  ],
  "ref": "main"
}
'
"<string>"

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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.