Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Get shell command

Get one shell command, including its status and exit code once exited.

GET/api/shell/{id}
Path parameters
idobjectrequired
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataShell1required
Show properties
idobjectrequired
Show properties
object
statusstringrequired
Allowed:runningexitedtimeoutkilled
commandstringrequired
cwdstringrequired
shellstringrequired
filestringrequired
pidobject
Show properties
object
exitnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
metadataobjectrequired
timeobjectrequired
Show properties
startednumber | string | stringrequired
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
completednumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
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
404ShellNotFoundError
_tagstringrequired
Allowed:ShellNotFoundError
idstringrequired
messagestringrequired
Request
curl -X GET "/api/shell/%5Bobject%20Object%5D"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": {
    "id": {},
    "status": "running",
    "command": "string",
    "cwd": "string",
    "shell": "string",
    "file": "string",
    "pid": {},
    "exit": 0,
    "metadata": {},
    "time": {
      "started": 0,
      "completed": 0
    }
  }
}