Desktop ›
List desktop links
GET
/v1/sandboxes/{id}/desktop/linksThe 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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const links = await sandbox.desktop.links();
Answer200 OK · DesktopLinks
- {
- "links": [{
- "id": string,
- "access": "view" | "control",
- "url": string | null,
- "createdAt": string,
- "expiresAt": string,
- "cutOnExpiry": boolean,
- }],
- }
The links.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The links.
DesktopLinks1 field
linksDesktopLink[]6 fields
idstring
accessviewcontrol
view: whoever opens it sees the screen, and cannot click, type or paste on it.
More
control: they can use it as well.urlstringnull
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.createdAtstring
expiresAtstring
From when the link leads nowhere.
cutOnExpiryboolean
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.