Skip to content

Open the desktop

View .md
POST

A short-lived URL streaming the machine's screen, or Chrome alone, with mouse and keyboard. Use it to watch or drive a browser running in the sandbox. The stream is prepared on first use, which can take a few seconds; while it is, this answers 409 sandbox_not_ready. Not available with test-mode keys.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • sandboxIdstringrequired

    Sandbox ID.

Body

application/json · optional

  • viewstring

    desktop streams the whole screen; browser streams Chrome alone.

    One ofdesktopbrowser
    Defaultdesktop

Responses

200The URL.
  • desktopobjectrequired
    2 properties
    • viewstringrequired
      One ofdesktopbrowser
    • urlstring<uri>required

      A short-lived URL that streams the machine's screen, mouse and keyboard included. Open it within a few minutes; anyone holding it can use the machine until the sandbox stops, so treat it as a secret. Ask for a new one after a resume.

400Invalid body, or a test-mode key.
  • codestringrequired
  • messagestringrequired
  • detailsobject
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Sandbox not found, or it belongs to another project.
  • codestringrequired
  • messagestringrequired
  • detailsobject
409`sandbox_not_running`: resume it first. `sandbox_not_ready`: the stream is still being prepared; retry in a few seconds.
  • codestringrequired
  • messagestringrequired
  • detailsobject
503`sandbox_unavailable`: the desktop is not available right now.
  • codestringrequired
  • messagestringrequired
  • detailsobject