Update PTY session
Update the title or viewport size of one PTY session.
PUT
/api/pty/{ptyID}Path parameters
ptyIDobjectrequiredQuery parameters
locationobject | anyRequest body
requiredapplication/jsontitlestringsizeobjectShow propertiesHide properties
rowsobjectrequiredShow propertiesHide properties
objectcolsobjectrequiredShow propertiesHide properties
objectResponses
200Success
locationLocation.InforequiredShow propertiesHide properties
directorystringrequiredworkspaceIDobjectShow propertiesHide properties
objectprojectobjectrequiredShow propertiesHide properties
idstringrequireddirectorystringrequireddataPtyrequiredShow propertiesHide properties
idobjectrequiredShow propertiesHide properties
objecttitlestringrequiredcommandstringrequiredargsstring[]requiredcwdstringrequiredstatusstringrequiredAllowed:
runningexitedpidobjectrequiredShow propertiesHide properties
objectexitCodeobjectShow propertiesHide properties
object400InvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequired404PtyNotFoundError
_tagstringrequiredAllowed:
PtyNotFoundErrorptyIDstringrequiredmessagestringrequiredRequest
curl -X PUT "/api/pty/%5Bobject%20Object%5D" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"size": {
"rows": {},
"cols": {}
}
}'const response = await fetch("/api/pty/%5Bobject%20Object%5D", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "string",
"size": {
"rows": {},
"cols": {}
}
})
});import requests
response = requests.put(
"/api/pty/%5Bobject%20Object%5D",
headers={
"Content-Type": "application/json"
},
json={
"title": "string",
"size": {
"rows": {},
"cols": {}
}
},
)Response
{
"location": {
"directory": "string",
"workspaceID": {},
"project": {
"id": "string",
"directory": "string"
}
},
"data": {
"id": {},
"title": "string",
"command": "string",
"args": [
"string"
],
"cwd": "string",
"status": "running",
"pid": {},
"exitCode": {}
}
}{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}{
"_tag": "PtyNotFoundError",
"ptyID": "string",
"message": "string"
}