SandboxesGit

Get a git config value

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 no value.
  • 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/config
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

key*string

Config key

Value in

  • "user.name"
  • "user.email"
  • "core.autocrlf"
  • "pull.rebase"
  • "init.defaultBranch"

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

curl -X GET "https://example.com/v1/sandboxes/string/git/config?key=user.name"
{  "value": "string"}

Read a git blob GET

Stream the raw bytes of a blob, at any size. - git writes the blob straight to the response. The download takes one transfer slot. It stops when it moves less than 256 KiB in 60 seconds, and after one hour. - A blob that fails during the download breaks the response before its `Content-Length`. - 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.

Count git changes GET

Count changed files and lines against `base` (default `HEAD`). - Untracked files count as added. - Files with unknown line counts count in `files.binary`, not in `lines`. - 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.