capture the machine's screen
GET
/v1/machines/{machine_id}/screenshotAuthorization
AuthorizationBearer token · headerrequiredan organization api key. browser clients use the session cookie instead.
or
computer_sessionAPI key · cookierequiredfirst-party httponly browser session; never readable from javascript.
Path parameters
machine_idstringrequiredmatches ^mch_[0-9a-z]{20,32}$
Query parameters
formatstringdefault: "png"
Allowed:
pngjpegwebpqualityintegermin 1 · max 100
Responses
200OK
imagestringrequiredformatstringrequiredAllowed:
pngjpegwebpdisplayDisplayrequiredShow propertiesHide properties
widthintegerrequiredmin -9007199254740991 · max 9007199254740991
heightintegerrequiredmin -9007199254740991 · max 9007199254740991
upbooleanrequiredresizablebooleanrequired400invalid request
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any401unauthenticated
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any402quota exceeded
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any403permission denied
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any404not found
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any409conflict with current state
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any412precondition failed
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any429rate limited
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any500internal error
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any501unsupported operation
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any503compute unavailable
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anyTry it
Server
Authorization
Parameters
Request
curl -X GET "https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/screenshot" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/screenshot", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/screenshot",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"image": "string",
"format": "png",
"display": {
"width": -9007199254740991,
"height": -9007199254740991,
"up": true,
"resizable": true
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}