Skip to main content
GET
/
applications
/
{id}
/
repository
/
contents
Read application repository file
curl --request GET \
  --url https://api.sevalla.com/v3/applications/{id}/repository/contents \
  --header 'Authorization: Bearer <token>'
{
  "path": "src/index.ts",
  "ref": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
  "content": "export const main = () => console.log('hello')",
  "size": 1024,
  "is_binary": false,
  "truncated": false
}

Documentation Index

Fetch the complete documentation index at: https://api-docs.sevalla.com/llms.txt

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

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Application identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Query Parameters

path
string
required

Path of the file to read, relative to the repository root.

Minimum string length: 1
Example:

"src/index.ts"

ref
string

Branch, tag, or commit SHA to read the file at. Defaults to the commit of the latest successful deployment, falling back to the default branch when there is no such deployment or the app's repository was changed after it (so the deployed commit no longer exists in the current repo).

Example:

"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"

Response

Default Response

path
string
required

Path of the file relative to the repository root

Example:

"src/index.ts"

ref
string | null
required

The ref the file was read at (the resolved commit SHA or branch)

Example:

"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"

content
string | null
required

UTF-8 file content. Null when the file is binary or exceeds the 1 MB size limit.

Example:

"export const main = () => console.log('hello')"

size
integer | null
required

File size in bytes

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1024

is_binary
boolean
required

Whether the file was detected as binary. Binary files do not return content.

Example:

false

truncated
boolean
required

Whether content was omitted because the file exceeds the 1 MB size limit

Example:

false