Kubi Docs
Kubi API

Work that takes longer than one call.


Get an operation

GET
https://api.trykubi.com/v1
/operations/{operation_id}
Bearer (API key)

Needs the read permission. Answers within 28 s.

Status of create, start, stop, restart or delete. Pass wait_s to hold the reply until it changes. Long polls are served from in-memory events, never by polling the database or the host.

Get an operation › path Parameters

operation_id
​string · maxLength: 23 · pattern: ^op_[0-9a-z]{20}$ · required

Operation id (op_...).

Get an operation › query Parameters

wait_s
​integer · int32 · min: 0 · max: 25

Long poll: hold the reply up to this many seconds until something changes. 0 answers at once. Capped at 25 so every call ends within 30 s.

Default: 0

Get an operation › Responses

Success.

Work that takes longer than one call. Kept 30 days.
id
​string · maxLength: 23 · pattern: ^op_[0-9a-z]{20}$ · required
​OperationKind · required
​required

reconciling: the outcome is uncertain and we are checking the host. Not a failure; do not retry.

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
created_at
​string · date-time · maxLength: 40 · required
updated_at
​string · date-time · maxLength: 40 · required
​
​
​
​
​

List a screen's operations

GET
https://api.trykubi.com/v1
/screens/{screen_id}/operations
Bearer (API key)

Needs the read permission. Answers within 2 s.

The screen's operations (create, start, stop, restart, delete, restore, convert, snapshot, reset and template saves), newest first, finished ones included. Kept 30 days.

List a screen's operations › path Parameters

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required

Screen id (scr_...).

List a screen's operations › query Parameters

limit
​integer · int32 · min: 1 · max: 100

Page size, 1 to 100.

Default: 20
after
​string · maxLength: 200 · pattern: ^[A-Za-z0-9_-]+$

Opaque cursor from the previous page's next.

List a screen's operations › Headers

Kubi-Run
​string · maxLength: 100 · pattern: ^[ -~]{1,100}$

Optional label that groups calls into one run in the screen's history. It is only a label and never locks the screen. The SDK fills it from KUBI_RUN, else Claude Code's CLAUDE_CODE_SESSION_ID, else one id per client it creates.

List a screen's operations › Responses

Success.

​Operation[] · maxItems: 100 · required
​required