Doku durchsuchen
Menü
Geändert am Auf GitHub bearbeiten

Konsole: guest-links

Als Markdown kopieren

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als Authorization: Bearer ndt_...; siehe API-Tokens. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Guest links: a link that lets someone without an account connect to some devices for a while. Errors of these routes beyond the permission check are {"error": "..."}.

List guest links.

Lists the links that are neither expired nor revoked. Admins and super admins see every link, other accounts the links they made.

Needs guest.create. neodesk guest-links list calls it.

200: Done (application/json)

Field Type Required
grants array of GuestLink yes
Error When
401 No session or API token, or one that is not valid (code session_required or token_invalid)
403 The account or the token may not do this, or a write from a browser came without a good CSRF token

POST /api/guest/access-links

Make a guest link that lets someone connect to devices for a while.

Every device must be in the account's device scope. The answer holds the link's token once; the list shows only its first 8 characters.

Needs guest.create. neodesk guest-links create calls it.

Request body, application/json:

Field Type Required What it is
peer_ids array of string yes The devices the link opens, by ID: 3 to 64 letters, digits, _ and -. Repeats are dropped.
ttl_minutes integer Minutes the link works, at most 1440 (more is cut to 1440); left out: 60; default 60, at least 1
view_only boolean The guest may only watch. Only for mesh and CDAP devices: a RustDesk device cannot be kept to watching.; default false
label string or null A name for the link
max_uses integer How many sessions the link may open; 0 for no limit; default 0, at least 0

201: Created (application/json)

GuestLinkCreated.

Error When
400 No devices, a device ID that is not valid, a field of the wrong type, or view_only for a device that is no mesh or CDAP device
401 No session or API token, or one that is not valid (code session_required or token_invalid)
403 The account may not do this, or a device is outside its device scope (then {"error": "..."})

Revoke a guest link.

Also ends the guest sessions that run on the link. An account that is no admin may revoke only the links it made.

Needs guest.create. neodesk guest-links revoke calls it. It cannot be undone.

Parameter In Type Required What it is
id path string yes The link's id (see guest-links list)

200: Done (application/json)

Field Type Required
revoked true yes
Error When
401 No session or API token, or one that is not valid (code session_required or token_invalid)
403 The account may not do this, or the link is another account's (then {"error": "forbidden"})
404 There is no such link

Durchsucht Seiten, Abschnitte, Befehle und Einstellungen.