SandboxesGit

List git branches

List the local branches in name order, with their upstream and ahead and behind counts, and the current branch.

  • More than limit branches return pagination.next_cursor. Pass it as cursor to list the next page.
  • Runs in the sandbox as the image user. Needs write access to the sandbox, because git runs the repository's own config and filters.
  • Served at the access endpoint of the sandbox (access_endpoint of GET /v1/sandboxes/{sandboxId}), not at the API host.
  • A paused sandbox returns 409 sandbox_paused, unless resume=true. A sandbox that started before its files server existed returns 409 sandbox_update_required until it restarts.
  • A refused operation returns its code as the problem type and in the Tektona-Files-Error header.
  • A path that starts with ~ or ~/ names the home directory of the user that the operation runs as. ~name returns 422.
GET
/v1/sandboxes/{sandboxId}/git/branches
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.sebastian-holstein.de under API Keys.

In: header

Path Parameters

sandboxId*string

Sandbox ID (ULID)

Query Parameters

path?string

A directory inside the work tree: absolute, or relative to the sandbox working directory

Default"."
resume?boolean

Wake a paused sandbox to serve this request

limit?integer

Maximum number of branches of this page

Formatint32
Range1 <= value <= 1000
Default1000
cursor?string

Continue after the last branch of a previous page: pass its pagination.next_cursor. Keep path the same; limit can change

Lengthlength <= 8192

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/sandboxes/string/git/branches"
{  "branches": [    {      "ahead": 0,      "behind": 0,      "head": "string",      "name": "string",      "upstream": "string"    }  ],  "current": "string",  "pagination": {    "has_more": true,    "next_cursor": "string"  }}

Initialise a repository POST

Create a git repository at `path`, with `initial_branch` as the first branch, and return its root. - Git creates a missing directory. - Local git writes on one work tree run one at a time. A write through the files endpoints does not wait for them. After a timeout, the outcome is unknown: the command can have run. - Runs in the sandbox as the image user. Needs write access to the sandbox, because git runs the repository's own config and filters. - Served at the access endpoint of the sandbox (`access_endpoint` of `GET /v1/sandboxes/{sandboxId}`), not at the API host. - A paused sandbox returns 409 `sandbox_paused`, unless `resume=true`. A sandbox that started before its files server existed returns 409 `sandbox_update_required` until it restarts. - A refused operation returns its code as the problem type and in the `Tektona-Files-Error` header. - A path that starts with `~` or `~/` names the home directory of the user that the operation runs as. `~name` returns 422.

List git files GET

List the tracked and the untracked, not ignored files of the work tree, for a file picker. - Paths come in byte order. More than `limit` paths return `pagination.next_cursor`. Pass it as `cursor` to list the next page. More than 6 MiB of paths in the work tree returns 413 `too_large`. - Runs in the sandbox as the image user. Needs write access to the sandbox, because git runs the repository's own config and filters. - Served at the access endpoint of the sandbox (`access_endpoint` of `GET /v1/sandboxes/{sandboxId}`), not at the API host. - A paused sandbox returns 409 `sandbox_paused`, unless `resume=true`. A sandbox that started before its files server existed returns 409 `sandbox_update_required` until it restarts. - A refused operation returns its code as the problem type and in the `Tektona-Files-Error` header. - A path that starts with `~` or `~/` names the home directory of the user that the operation runs as. `~name` returns 422.