Open the desktop
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
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
sandboxIdstringrequiredSandbox ID.
Body
application/json · optional
viewstringdesktopstreams the whole screen;browserstreams Chrome alone.One ofdesktopbrowserDefaultdesktop
Responses
200The URL.
desktopobjectrequired2 properties
viewstringrequiredOne ofdesktopbrowserurlstring<uri>requiredA 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.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Sandbox not found, or it belongs to another project.
codestringrequiredmessagestringrequireddetailsobject
409`sandbox_not_running`: resume it first. `sandbox_not_ready`: the stream is still being prepared; retry in a few seconds.
codestringrequiredmessagestringrequireddetailsobject
503`sandbox_unavailable`: the desktop is not available right now.
codestringrequiredmessagestringrequireddetailsobject