Run shell command
Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.
POST
/api/shellQuery parameters
locationobject | anyRequest body
requiredapplication/jsoncommandstringrequiredcwdstringtimeoutobjectrequiredShow propertiesHide properties
objectmetadataobjectResponses
200Success
locationLocation.InforequiredShow propertiesHide properties
directorystringrequiredworkspaceIDobjectShow propertiesHide properties
objectprojectobjectrequiredShow propertiesHide properties
idstringrequireddirectorystringrequireddataShell1requiredShow propertiesHide properties
idobjectrequiredShow propertiesHide properties
objectstatusstringrequiredAllowed:
runningexitedtimeoutkilledcommandstringrequiredcwdstringrequiredshellstringrequiredfilestringrequiredpidobjectShow propertiesHide properties
objectexitnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringmetadataobjectrequiredtimeobjectrequiredShow propertiesHide properties
startednumber | string | stringrequiredShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringcompletednumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
string400InvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequiredRequest
curl -X POST "/api/shell" \
-H "Content-Type: application/json" \
-d '{
"command": "string",
"cwd": "string",
"timeout": {},
"metadata": {}
}'const response = await fetch("/api/shell", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"command": "string",
"cwd": "string",
"timeout": {},
"metadata": {}
})
});import requests
response = requests.post(
"/api/shell",
headers={
"Content-Type": "application/json"
},
json={
"command": "string",
"cwd": "string",
"timeout": {},
"metadata": {}
},
)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
}
}
}{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}