Skip to content

List branches

POST
/v1/sandbox/{sandboxID}/git/branches

List all branches in a repository inside the sandbox.

sandboxID
required
string

Unique sandbox identifier.

object
path
required

Path to the git repository.

string
branch_type

Whether to list local, remote, or all branches.

string
nullable
Allowed values: local remote all
contains

Only include branches that contain the given commit SHA.

string
nullable
not_contains

Only include branches that do not contain the given commit SHA.

string
nullable

Branches output.

object
output
required

Command output text.

string
exit_code
required

Exit code of the git command.

integer format: int32

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string