Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

List PTY sessions

List PTY sessions for a location, including exited sessions retained until removal.

GET/api/pty
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataPty[]required
Show properties
Array of Pty
idobjectrequired
Show properties
object
titlestringrequired
commandstringrequired
argsstring[]required
cwdstringrequired
statusstringrequired
Allowed:runningexited
pidobjectrequired
Show properties
object
exitCodeobject
Show properties
object
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
Request
curl -X GET "/api/pty"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": [
    {
      "id": {},
      "title": "string",
      "command": "string",
      "args": [
        "string"
      ],
      "cwd": "string",
      "status": "running",
      "pid": {},
      "exitCode": {}
    }
  ]
}