List git branches
List the local branches with their upstream and ahead and behind counts, and the current branch.
- 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_endpointofGET /v1/sandboxes/{sandboxId}), not at the API host. - A paused sandbox returns 409, unless
resume=true. A sandbox that started before its files server existed returns 409sandbox_update_requireduntil it restarts. - A refused operation returns its code as the problem type.
- A path that starts with
~or~/names the home directory of the user that the operation runs as.~namereturns 422.
Authorization
apiKey API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.
In: header
Path Parameters
Sandbox ID (ULID)
Query Parameters
A directory inside the work tree: absolute, or relative to the sandbox working directory
"."Wake a paused sandbox to serve this request
Response Body
application/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"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}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, 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. - 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. - 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, 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. - A path that starts with `~` or `~/` names the home directory of the user that the operation runs as. `~name` returns 422.