API reference

Commands

Run a program in a Kiste with its exact output and exit status, and follow durable command records.

Run a program in a Kiste with its exact output and exit status, and follow durable command records.

Run a command

POST /v1/instances/{name}/exec

Runs argv in the Kiste without a shell and streams newline-delimited JSON: one started event, output events with base64 stdout or stderr bytes in order, then exactly one completed event with the exit code, signal, duration and byte counts, or failed when the command could not finish. Standard input is not forwarded. Pass your own id (a UUID) to cancel the command later or find its record. A slow reader slows the command down instead of losing output.

Path parameters:

NameTypeRequiredDescription
namestringyesThe Kiste's name.
curl -sS -X POST "https://kiste.run/v1/instances/review-42/exec" \
  -H "Authorization: Bearer $KISTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"argv":["git","status","--short"],"cwd":"/workspace"}'

Request body: ExecRequest

FieldTypeRequiredDescription
argvarray of stringyesThe program and its arguments, passed exactly, without a shell.
cwdstring or nullnoWorking directory inside the Kiste.
envmap of stringnoEnvironment variables for the command.
idstring (uuid) or nullnoYour own UUID for the command, to cancel it or find its record.
timeout_msinteger (int64)noLongest run time in milliseconds.

Responses:

  • 200 One JSON event per line. Body: ExecEvent (application/x-ndjson)

Errors use the error envelope.

Cancel a running command

DELETE /v1/instances/{name}/exec/{id}

Cancels a command started with your own id on this Kiste.

Path parameters:

NameTypeRequiredDescription
namestringyesThe Kiste's name.
idstringyesThe object's ID.
curl -sS -X DELETE "https://kiste.run/v1/instances/review-42/exec/ID" \
  -H "Authorization: Bearer $KISTE_TOKEN"

Responses:

Errors use the error envelope.

List a Kiste's commands

GET /v1/instances/{name}/commands

Durable records of the commands run in one Kiste: state, exit code, timing and byte counts. Output itself is not stored.

Path parameters:

NameTypeRequiredDescription
namestringyesThe Kiste's name.
curl -sS "https://kiste.run/v1/instances/review-42/commands" \
  -H "Authorization: Bearer $KISTE_TOKEN"

Responses:

Errors use the error envelope.

Get a command

GET /v1/commands/{id}

The durable record of one command, running or finished.

Path parameters:

NameTypeRequiredDescription
idstringyesThe object's ID.
curl -sS "https://kiste.run/v1/commands/ID" \
  -H "Authorization: Bearer $KISTE_TOKEN"

Responses:

Errors use the error envelope.

Interrupt a command

POST /v1/commands/{id}/interrupt

Asks a running command to stop, with an optional reason for the record. The command receives an interrupt and can finish cleanly; its record shows when the interrupt was requested.

Path parameters:

NameTypeRequiredDescription
idstringyesThe object's ID.
curl -sS -X POST "https://kiste.run/v1/commands/ID/interrupt" \
  -H "Authorization: Bearer $KISTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reason":"superseded"}'

Request body: InterruptCommandRequest

FieldTypeRequiredDescription
reasonstring or nullno

Responses:

Errors use the error envelope.

On this page