SandboxesGit

Read a git blob

Return the raw bytes of a blob.

  • A blob above 4 MiB returns 413 file_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, 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.
GET
/v1/sandboxes/{sandboxId}/git/blob
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai 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

oid*string

Blob id, for example old_oid from GET git/diff

Match^([0-9a-f]{40}|[0-9a-f]{64})$

Response Body

application/octet-stream

application/problem+json

curl -X GET "https://example.com/v1/sandboxes/string/git/blob?oid=string"

The body is not JSON: application/octet-stream

Fetch from a git remote PUT

Fetch from `remote`. - A fetch does not wait for the local git writes. - An HTTPS remote authenticates with the project's Git Credentials at the egress gateway. SSH remotes are not supported. The command stops after 4 minutes. - 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.

Get a git config value GET

Read `key` from the repository config only, never the global config. - Allowed keys: `user.name`, `user.email`, `core.autocrlf`, `pull.rebase`, `init.defaultBranch`. - An unset key returns 404 `not_found`. - 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.