Attach terminal
Upgrades to a WebSocket attached to an interactive shell in a running environment. Authenticates with the ticket from OpenTerminal sent in Sec-WebSocket-Protocol as kosem.terminal.v1, kosem.auth.<token>. Binary frames carry terminal input and offset-prefixed output; text JSON frames carry resize, status, ready, exit and error messages.
Upgrades to a WebSocket attached to an interactive shell in a running environment.
Authenticates with the ticket from OpenTerminal sent in Sec-WebSocket-Protocol as kosem.terminal.v1, kosem.auth.. Binary frames carry terminal input and offset-prefixed output; text JSON frames carry resize, status, ready, exit and error messages.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$environment*stringThe environment's ID.
^env_[0-7][0-9a-hjkmnp-tv-z]{25}$terminal*stringThe terminal session ID.
^trm_[0-7][0-9a-hjkmnp-tv-z]{25}$cols?integerInitial terminal width in columns. Defaults to 80 when 0.
int320 <= value <= 500rows?integerInitial terminal height in rows. Defaults to 24 when 0.
int320 <= value <= 200after?integerLast output byte offset already received, for lossless replay on reattach.
int640 <= valuecreate?booleanStart a new shell session if this ID doesn't exist yet.
Switching Protocols: the connection speaks the protocol that the request asked for from here on.
curl -X GET 'https://api.kosem.ai/v1/projects/string/environments/string/terminals/string/attach'