Create a git commit
Commit the staged changes and return the commit id.
- Without
author_nameandauthor_email, the git config in the sandbox must setuser.nameanduser.email, else 422git_identity_missing. - When there is nothing to commit and
allow_emptyis not set, the commit returns 409nothing_to_commit.allcommits the changes to tracked files only, asgit commit --alldoes. - The hooks of the repository run as the image user.
- 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_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
Wake a paused sandbox to serve this request
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Stage every change to a tracked file first (git commit --all)
Commit even when nothing is staged
Author and committer email; defaults to user.email of the git config in the sandbox
Author and committer name; defaults to user.name of the git config in the sandbox
Commit message
1 <= lengthA directory inside the work tree: absolute, or relative to the sandbox working directory
"."Response Body
application/json
application/problem+json
curl -X POST "https://example.com/v1/sandboxes/string/git/commits" \ -H "Content-Type: application/json" \ -d '{ "message": "string" }'{ "oid": "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"}Create a git branch POST
Create a branch at `start_point`. With `checkout`, switch to it. - 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.
Delete a git branch DELETE
Delete a local branch. An unmerged branch needs `force=true`. - 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.