Skip to content
Dashboard

Capture screenshot

POST/computers/{id}/screenshot

Take a screenshot of the current browser viewport, optionally as base64. Optionally specify tab_id (browser sessions only)

Path ParametersExpand Collapse
id: string
Body ParametersJSONExpand Collapse
base64: optional boolean
tab_id: optional string
ReturnsExpand Collapse
ActionResult = object { error_message, executed_tab_id, page_context, 4 more }
error_message: optional string
executed_tab_id: optional string
page_context: optional V2GoBackendInternalTypesPageContext { device_scale_factor, is_main_tab, page_height, 8 more }
device_scale_factor: optional number
is_main_tab: optional boolean
page_height: optional number
page_width: optional number
scroll_x: optional number
scroll_y: optional number
tab_id: optional string
title: optional string
url: optional string
viewport_height: optional number
viewport_width: optional number
request_id: optional string
result: optional map[unknown]
status: optional string
timestamp: optional string

Capture screenshot

curl https://api.tzafon.ai/computers/$ID/screenshot \
    -X POST \
    -H "Authorization: Bearer $TZAFON_API_KEY"
{
  "error_message": "error_message",
  "executed_tab_id": "executed_tab_id",
  "page_context": {
    "device_scale_factor": 0,
    "is_main_tab": true,
    "page_height": 0,
    "page_width": 0,
    "scroll_x": 0,
    "scroll_y": 0,
    "tab_id": "tab_id",
    "title": "title",
    "url": "url",
    "viewport_height": 0,
    "viewport_width": 0
  },
  "request_id": "request_id",
  "result": {
    "foo": "bar"
  },
  "status": "status",
  "timestamp": "timestamp"
}
Returns Examples
{
  "error_message": "error_message",
  "executed_tab_id": "executed_tab_id",
  "page_context": {
    "device_scale_factor": 0,
    "is_main_tab": true,
    "page_height": 0,
    "page_width": 0,
    "scroll_x": 0,
    "scroll_y": 0,
    "tab_id": "tab_id",
    "title": "title",
    "url": "url",
    "viewport_height": 0,
    "viewport_width": 0
  },
  "request_id": "request_id",
  "result": {
    "foo": "bar"
  },
  "status": "status",
  "timestamp": "timestamp"
}