Resize a PTY session
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/pty/{sid}/resize"
payload = {
"cols": 2,
"rows": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/pty/{sid}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cols": 2,
"rows": 2
}
'{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}PTY
Resize a PTY session
POST
/
v1
/
machines
/
{id}
/
pty
/
{sid}
/
resize
Resize a PTY session
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/pty/{sid}/resize"
payload = {
"cols": 2,
"rows": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/pty/{sid}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cols": 2,
"rows": 2
}
'{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Authorizations
API key passed as Bearer token
Body
application/json
Response
Session resized