Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Get PTY session

Get one PTY session, including its exit code once exited.

GET/api/pty/{ptyID}
Path parameters
ptyIDobjectrequired
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataPtyrequired
Show properties
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
404PtyNotFoundError
_tagstringrequired
Allowed:PtyNotFoundError
ptyIDstringrequired
messagestringrequired
Request
curl -X GET "/api/pty/%5Bobject%20Object%5D"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": {
    "id": {},
    "title": "string",
    "command": "string",
    "args": [
      "string"
    ],
    "cwd": "string",
    "status": "running",
    "pid": {},
    "exitCode": {}
  }
}