Skip to main content
GET
/
{org}
/
{repo}
/
content
Get content
curl --request GET \
  --url https://api.mesa.dev/v1/{org}/{repo}/content \
  --header 'Authorization: Bearer <token>'
{
  "type": "<string>",
  "name": "<string>",
  "path": "<string>",
  "sha": "<string>",
  "size": 123,
  "encoding": "<string>",
  "content": "<string>",
  "mode": "100644"
}
Required scope: read

Authorizations

Authorization
string
header
required

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

Path Parameters

org
string
required

Organization slug

Minimum string length: 1
repo
string
required

Repository name

Minimum string length: 1

Query Parameters

change_id
string

Change id to read content from. Defaults to the current change at the default bookmark tip. You may also pass the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to read the empty tree.

Pattern: ^[zyxwvutsrqponmlk]{32}$
path
string
depth
integer

Directory traversal depth: 0 for directory metadata only, 1 for direct children, up to 10

Required range: 0 <= x <= 10

Response

Content response

type
string
required
Allowed value: "file"
name
string
required
path
string
required
sha
string
required
size
number
required
encoding
string
required
Allowed value: "base64"
content
string
required
mode
enum<string>
required

POSIX file mode for a regular file

Available options:
100644,
100755