Docs
Desktop ›

List desktop links

GET/v1/sandboxes/{id}/desktop/links

The links to the sandbox's desktop that have not expired, the oldest first. An expired link is on no list. It changes nothing, and is answered whatever state the sandbox is in.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. const links = await sandbox.desktop.links();
Answer200 OK · DesktopLinks
  1. {
  2. "links": [{
  3. "id": string,
  4. "access": "view" | "control",
  5. "url": string | null,
  6. "createdAt": string,
  7. "expiresAt": string,
  8. "cutOnExpiry": boolean,
  9. }],
  10. }

The links.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 The links.

DesktopLinks1 field
links
DesktopLink[]6 fields
id
string
access
viewcontrol
view: whoever opens it sees the screen, and cannot click, type or paste on it.
More control: they can use it as well.
url
stringnull
Where the link leads, in a browser.
More It needs no token and is hard to guess: keep it as a password is kept until it expires. Null where GET /v1/policy says publicUrls is false.
createdAt
string
expiresAt
string
From when the link leads nowhere.
cutOnExpiry
boolean
Whether a stream that is open through the link is cut when it expires.
More False lets it play on, and the link still opens none after.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.