Skip to main content
GET
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

The resource's ID, as returned in its id field

Query Parameters

path
string

A directory to list, relative to the repository root (e.g. src/routes). Omit for the whole repository.

ref
string
default:main

The branch, tag or commit sha to read (a sha prefix of 7 or more characters works for commits on main). Defaults to main.

Response

The files at ref

object
enum<string>
required
Available options:
site_source_tree
head_sha
string
required

Where main points now. Pass it as expected_head_sha when you commit.

ref
string
required

The ref this read asked for: main unless you passed one.

commit_sha
string
required

The commit ref resolved to, which this answer was read at. Pass it as ref to read more of the same revision.

path
string | null
required

The directory listed, normalized; null for the whole repository.

files
object[]
required