Open terminal
Issues a short-lived ticket to connect to an interactive shell in a running environment. For environments owned by an agent, also requires agents.agents.send on that agent. Pass the returned token to AttachTerminal in Sec-WebSocket-Protocol as kosem.auth.<token>.
Issues a short-lived ticket to connect to an interactive shell in a running environment.
For environments owned by an agent, also requires agents.agents.send on that agent. Pass the returned token to AttachTerminal in Sec-WebSocket-Protocol as kosem.auth..
bearerAuthorizationBearer <token>An access token, or an API key.
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}$application/json- body
sessionId?stringExisting terminal session ID to reattach to; leave empty to start a new session.
^trm_[0-7][0-9a-hjkmnp-tv-z]{25}$OK
application/json- response
expireTime*stringWhen the ticket expires.
date-timesessionId*stringTerminal session ID to pass to AttachTerminal.
token*stringShort-lived attach ticket. Pass it in Sec-WebSocket-Protocol as kosem.auth. (don't pass it in the URL).
curl -X POST 'https://api.kosem.ai/v1/projects/string/environments/string/terminals' \
-H 'Content-Type: application/json' \
-d '{}'{
"expireTime": "2019-08-24T14:15:22Z",
"sessionId": "string",
"token": "string"
}