SandboxesGit

Get git diff files

Compare the working tree (staged and unstaged changes) with base, file by file, and list untracked files.

  • The lines object counts changed lines, or is null when the count is unknown.
  • To get the base side of a file, call GET git/blob with old_oid.
  • 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/diff
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

base?string

Revision to compare the working tree with; defaults to HEAD

Match^[^-\x00\n\r][^\x00\n\r]*$

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/diff"
{  "base": "string",  "files": [    {      "binary": true,      "lines": {        "additions": 0,        "deletions": 0      },      "new_mode": "string",      "old_mode": "string",      "old_oid": "string",      "old_path": "string",      "path": "string",      "status": "added"    }  ],  "root": "string",  "truncated": true}

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.

Get git log GET

List the commits of `ref`, newest first. - A history with more than `limit` commits returns `pagination.next_cursor`. Pass it as `cursor` to list older commits. The pages follow the commit that `ref` named on the first page. - More than 6 MiB of commit data on one page returns 413 `too_large`. Use a lower `limit`. - 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.