/api/screenshot/:token

get a screenshot of the running session

Method

POST

Parameters

  • id — session id
  • width — (optional) — screenshot width in pixels
  • height — (optional) — screenshot height in pixels
  • format — (optional) “png” | “jpeg” — returns the data in the format specified. Default “png”
  • keep_aspect — (optional) —  0 |  1 — keep aspect ratio when reducing image size. Default “1”
  • geometry — (optional) screenshot geometry widthxheight — This is not needed if using the width and height options

 

The screenshot API requires the ImageMagick, ImageMagick-perl, and perl-X11-Protocol packages. If any of these is not installed, a -32002 error is returned.

Result

JSON object with the following members

  • src — dataUri of the image data