Console: devices
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
Devices: list, details, notes, tags, bans, connection settings.
List the device password policies: generate a password per device, change it every few days, change it after each session.
Without a target, the policies of the devices the account sees, and of the groups, folders and organizations it may name (all of them for an account that sees every organization, else only its organizations). With target_type and target_id, that one policy. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password-policies calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
target_type |
query | string, one of device, group, folder, org |
With target_id: only the policy of this target |
target_id |
query | string | The device ID, the group's guid, the folder's number or the organization's ID |
200: Done (application/json)
Object or object.
| Error | When |
|---|---|
| 400 | The target is not valid (invalid_target) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account lacks device.password_set, does not see the device, or may not name the group, folder or organization (target_not_allowed) |
Set how the server keeps the device passwords of a device, group, folder or organization; all off removes the policy.
Replaces the target's policy. A device follows its own policy, else its folder's, else its groups' merged, else its organizations' merged; merged means generate and after-session are on when one of them has them on, and the shortest schedule counts. The server applies the policies every minute; a password someone changed at the device stays as it is. Written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password-policy-set calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
target_type |
string, one of device, group, folder, org |
yes | |
target_id |
string | yes | The device ID, the group's guid, the folder's number or the organization's ID; at most 128 characters |
generate |
boolean | Give each device that can take one its own generated password | |
rotate_days |
integer | Change the password every this many days; 0 for never; at least 0, at most 365 | |
rotate_after_session |
boolean | Change the password after each session to the device |
200: Saved; policy is null when all three were off and the policy was removed (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
policy |
DevicePasswordPolicy or null | yes | null when there is none |
| Error | When |
|---|---|
| 400 | The body is not JSON (invalid_json), the target is not valid (invalid_target), or rotate_days is out of range (invalid_rotate_days) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account lacks device.password_set, does not see the device, or may not name the group, folder or organization (target_not_allowed) |
Set the device passwords of every device in a group, folder or organization: a generated one for each, or the same for all.
Only the devices the account sees get one: the others are counted in outside_scope. Devices with a RustDesk client, which can't take a password from the console, are counted in stock. Each device gets its password with its next heartbeat, as with devices password-set. A group or folder needs an account that sees every organization (super admin, server admin or global admin); an organization also one the account belongs to. Written to the audit log, refusals too. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password-bulk calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
target_type |
string, one of group, folder, org, device |
yes | What the devices belong to; device names one device |
target_id |
string | yes | The group's guid, the folder's number, the organization's ID or the device ID; at most 128 characters |
mode |
string, one of generate, same |
yes | generate: each device its own password; same: password for all |
password |
string | Only for mode same: no spaces at either end and no control characters; at least 8 characters, at most 128 characters |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
set |
integer | yes | How many devices got a password |
outside_scope |
integer | yes | Devices the account doesn't see, left alone |
stock |
integer | yes | Devices with a RustDesk client, left out |
devices |
array of string | yes | The devices that got a password |
| Error | When |
|---|---|
| 400 | The body is not JSON (invalid_json), the target is not valid (invalid_target), the mode is not valid (invalid_mode), mode generate came with a password (password_or_generate), or the password is not valid (as for devices password-set) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account lacks device.password_set, or may not name this group, folder or organization (target_not_allowed) |
| 503 | The server has no key for device passwords (vault_unavailable) |
List devices with their status, folder and groups.
Answers every device the account may see, the remote targets after the clients. No pages: the list is whole. Each device has the values of the device fields the account sees in fields (left out when it sees none).
Needs device.view. neodesk devices list calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
search |
query | string | Only devices whose ID, user, hostname or note contains this, in any case, or a value of a text, long text or link device field the account sees |
status |
query | string, one of online, offline, banned |
Only online devices, offline ones (not banned), or banned ones |
hasNotes |
query | string, one of true |
true for only devices with a note |
includeDeleted |
query | string, one of true |
true to list deleted devices too |
sortBy |
query | string, one of last_online, id, hostname, created_at, os, version, username, note or string |
Order by this field, compared as text, or by a device field the account sees: field.<key> (numbers and dates as numbers, choices in the order of their list, devices without a value last). A field the account doesn't see is ignored like any other unknown value.; default "last_online" |
sortOrder |
query | string, one of asc, desc |
default "desc" |
f |
query | array of string | A device field condition, key:operator:value: eq, contains (text), min and max (numbers and dates), or key:empty and key:notempty. Repeat it to combine; a device must meet every one. A key the account doesn't see is refused like one that doesn't exist (device_field_unknown_field). Remote targets meet no condition.; at most 20 items |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.devices |
array of Device | yes | |
data.total |
integer | yes | How many devices the list holds |
| Error | When |
|---|---|
| 400 | A field filter that doesn't fit; code device_field_<reason>: device_field_unknown_field (also for a field the account doesn't see), device_field_bad_filter, device_field_value_misfit, device_field_value_not_a_choice |
| 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 |
Delete several devices at once.
Every device must exist and be one the account may see, or nothing is deleted. Each goes to the bin and loses its device tokens.
Needs device.delete. neodesk devices bulk-delete calls it. It cannot be undone.
Request body, application/json:
| Field | Type | Required |
|---|---|---|
ids |
array of string | yes |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.deleted |
integer | How many devices the server deleted |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | A device of the list does not exist; the answer names it in id |
Show one device with all its details.
Answers a deleted device too.
Needs device.view. neodesk devices get calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
Device and object | 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 |
| 404 | There is no such item, or the account does not see it |
Change a device's note, display name or user.
Writes each field the body has, trimmed. Longer text is cut to the limit, not refused.
Needs device.edit. neodesk devices update calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
note |
string | at most 512 characters |
display_name |
string | at most 128 characters |
user |
string | The user shown for the device; at most 128 characters |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.changes |
integer |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The server refused the change |
Delete a device and revoke its device tokens.
Moves the device to the bin (a soft delete) unless hard is true. Every deleted device loses its device tokens. A restore brings a device back from the bin.
Needs device.delete. neodesk devices delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
revoke |
query | string, one of true |
true to also put the ID on the blocklist and drop its connections | |
cascade |
query | string, one of true |
true to also delete the devices linked to it. Refused with 403 when the account may not see one of them | |
hard |
query | string, one of true |
true to delete it for good, also when it is in the bin already, with what the console keeps of it |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
revoked |
boolean | ||
hard |
boolean | ||
cascaded |
array of string | The linked devices deleted with it |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 500 | The server could not delete the device |
Show who may connect to a device and how.
Needs device.view. neodesk devices access-policy calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
boolean | yes | |
data |
AccessPolicy | ||
error |
string | With success false: why the server call failed |
| 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 |
| 404 | There is no such item, or the account does not see it |
Set who may connect to a device and how.
Admins only. The password is stored hashed; leave it out to keep the one set. The console answers 200 with success false and the error of the call when the server refuses the change.
Needs org.edit. neodesk devices access-policy-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
unattended_enabled |
boolean | |
password |
string | A new unattended password |
clear_password |
boolean | true removes the password |
schedule_enabled |
boolean | |
schedule_days |
string | Comma-separated days: mon, tue, wed, thu, fri, sat, sun |
schedule_start_time |
string | HH:MM, 24 hours; checked when schedule_enabled is true |
schedule_end_time |
string | HH:MM, 24 hours; checked when schedule_enabled is true |
schedule_timezone |
string | An IANA time zone |
allowed_operators |
string | Comma-separated usernames; empty for all |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
boolean | yes | |
data |
object | ||
data.success |
true |
||
error |
string | With success false: why the server call failed |
| 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 |
| 404 | There is no such item, or the account does not see it |
Remove a device's own access policy.
Admins only. The device falls back to the defaults, all off. The console answers 200 with success false and the error of the call when the server refuses the change.
Needs org.edit. neodesk devices access-policy-delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
boolean | yes | |
data |
object | ||
data.success |
true |
||
error |
string | With success false: why the server call failed |
| 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 |
| 404 | There is no such item, or the account does not see it |
Show what a device reported about its use (NeoDesk agent).
Asks the NeoDesk agent over its connection. Needs device.view. When the agent is offline, the route answers the snapshot the server keeps, or 202 with a collection queued for when it comes back (only for an account with device.edit).
neodesk devices activity calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
200: Done (application/json)
202: The agent is offline; a collection is queued (application/json)
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The agent answered with an error |
| 503 | The agent is not connected (agent_offline) |
| 504 | The agent did not answer in time (agent_timeout) |
Show when a device was online over a day.
Needs device.view. neodesk devices availability calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
day |
query | string | The day, like 2026-11-23 (default today) | |
tz_offset_minutes |
query | integer | Minutes from local time to UTC, as JavaScript's getTimezoneOffset gives them (default the server's own) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
PeerAvailability | 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The server could not answer |
Ban a device: it can no longer connect.
The device loses its device tokens. An unban gives none back.
Needs device.ban. neodesk devices ban calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
reason |
string | Shown on the device page and in the audit log; at most 500 characters |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
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 or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 502 | The server did not change the ban |
Give a device a new ID (6 to 16 letters, digits, - and _).
Refuses an ID another device holds, also a deleted one. The console's folders, groups and other records follow the new ID.
Needs device.change_id. neodesk devices change-id calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
newId |
string | yes | at least 6 characters, at most 16 characters |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
Show whether the device's organization stored a device password (never the password).
The account must belong to the device's organization unless it sees every organization.
Needs device.connect. neodesk devices connect-password calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
password_set |
boolean | yes | |
org_id |
string | With password_set true: the organization |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 500 | The server could not answer, also when its credential vault is not set up |
Let a device accept only incoming connections, or both ways again.
The server queues the change for the device's support agent. The reason goes into the audit log.
Needs device.connection_mode. neodesk devices connection-mode calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
mode |
string, one of normal, incoming-only |
yes | incoming-only lets the device only accept connections; normal allows both ways |
reason |
string | yes | at most 500 characters |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.command |
object | The queued command, with previous_mode, revision and command_id | |
data.policy |
object | The connection mode policy, with effective_mode |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 409 | The server refused: the device is a support agent (support_agent_permanent), can't switch its mode (capability_required), has no UUID or is blocked |
| 502 | The server refused the change |
List the remote sessions to a device, newest first.
Needs device.view. neodesk devices sessions calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
limit |
query | integer | How many sessions; default 50, at least 1, at most 200 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.count |
integer | |
data.peer_id |
string | |
data.sessions |
array of ConnectionSession and object |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The server could not answer |
Issue a new device token for a device (shown once).
Ends every device token of the device now. The device gets a new one the next time it checks in with its key; the answer holds no token.
Needs device.edit. neodesk devices device-token calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
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 or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Show the newest system events of a device (NeoDesk agent).
Asks the NeoDesk agent over its connection. Needs device.view. When the agent is offline, the route answers the snapshot the server keeps, or 202 with a collection queued for when it comes back (only for an account with device.edit).
neodesk devices events calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
limit |
query | integer | How many entries of the event log; default 100, at least 1, at most 500 |
200: Done (application/json)
202: The agent is offline; a collection is queued (application/json)
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The agent answered with an error |
| 503 | The agent is not connected (agent_offline) |
| 504 | The agent did not answer in time (agent_timeout) |
List the device groups a device is in.
groups holds every group the account may see; memberships the tag groups whose tag the device has and the manual groups it is in.
Needs device.view. neodesk devices groups calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.groups |
array of DeviceGroup | yes |
data.memberships |
array of DeviceGroup | 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 |
| 404 | There is no such item, or the account does not see it |
Replace the manual device groups of a device.
A device can be in one manual group at most. GUIDs of tag groups and of groups the account may not see are ignored; an empty list takes the device out of every manual group.
Needs device.edit. neodesk devices groups-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
groupGuids |
array of string | yes | at most 100 items |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.groupGuids |
array of string | The manual group the device is in now, or none |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
Show whether the console set a device's password, whether the device took it, who set it and when (never the password).
Needs device.password_set, device.password_use or device.password_view. The answer is the server's, with what the account may do with the password added. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
DevicePasswordStatus and object.
| 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 |
| 404 | There is no such device |
| 500 | The server could not answer |
Set a device's permanent password from the console, typed or generated by the server.
The server keeps the password encrypted and hands the device only a sealed check value with the answer to its next heartbeat; state stays pending until the device reports that it took it. The password the device had stays usable until then. A generated password is not in the answer. Each change and each refusal, also of a device outside the account's scope, is written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
Either password or generate
| Field | Type | What it is |
|---|---|---|
password |
string | No spaces at either end and no control characters; at least 8 characters, at most 128 characters |
generate |
boolean | true lets the server generate a password: four groups of four letters and digits |
200: Stored; the device gets it with its next heartbeat (application/json)
| Error | When |
|---|---|
| 400 | The body is not JSON (invalid_json), has both a password and generate (password_or_generate), or the password is not valid: password_too_short, password_too_long, password_spaces_around, control_character or invalid_text |
| 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 |
| 404 | There is no such device |
| 409 | The device runs a stock RustDesk client, which can't take a password from the console (stock_client): set the password on the computer |
| 503 | The server has no key for device passwords (vault_unavailable) |
Remove the device password the console set; the device is asked to remove it too.
The device is asked with its next heartbeat; the answer has op clear and state pending until it did. The server only forgets its copy, and the device keeps the password, with forget=true, for a device whose client can't take passwords from the console, for a password someone changed at the device, and when a removal is waiting already. Written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.password_set. neodesk devices password-remove calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
forget |
query | boolean | true (or 1) to only forget the server's copy; the device keeps the password |
200: Done: the state after the removal, or with nothing set when the server forgot its copy (application/json)
| 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 |
| 404 | There is no such device, or the console set no password for it (not_set) |
| 500 | The server could not answer |
List the processes on a device (NeoDesk agent).
Asks the NeoDesk agent over its connection. Needs device.view. When the agent is offline, the route answers the snapshot the server keeps, or 202 with a collection queued for when it comes back (only for an account with device.edit).
neodesk devices processes calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
200: Done (application/json)
202: The agent is offline; a collection is queued (application/json)
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The agent answered with an error |
| 503 | The agent is not connected (agent_offline) |
| 504 | The agent did not answer in time (agent_timeout) |
Say why a session to a device can or cannot start.
The server's reason: online, offline, unknown, revoked, blocked, banned, deleted or a changed key.
Needs device.view. neodesk devices reach calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
reason |
string, one of online, device_offline, device_unknown, device_revoked, device_blocked, device_banned, device_removed, key_changed |
yes | |
last_online |
string or null (date-time) | ||
can_unblock |
boolean | The account may unblock a revoked or blocked ID (device.delete) |
| 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 |
| 502 | The server could not answer |
Set a device's display name.
The name is trimmed and cut to 200 characters.
Needs device.edit. neodesk devices rename calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
display_name |
string | yes | at most 200 characters |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.changes |
integer | ||
data.display_name |
string | The name as stored |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
Bring back a deleted device.
Needs device.delete. neodesk devices restore calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.id |
string | |
data.status |
string |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 500 | The server could not restore the device |
List the services on a device (NeoDesk agent).
Asks the NeoDesk agent over its connection. Needs device.view. When the agent is offline, the route answers the snapshot the server keeps, or 202 with a collection queued for when it comes back (only for an account with device.edit).
neodesk devices services calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID |
200: Done (application/json)
202: The agent is offline; a collection is queued (application/json)
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The agent answered with an error |
| 503 | The agent is not connected (agent_offline) |
| 504 | The agent did not answer in time (agent_timeout) |
Show who a device without a desktop runs its shell as, and where that comes from.
The account the console set wins over the one the device was joined with. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.view. neodesk devices shell calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
headless |
boolean | yes | The device runs NeoDesk without a desktop (its signed heartbeat says so) |
shell_user |
string | yes | The account the shell runs as; empty for none, and then the device has no shell |
source |
string, one of console, device, none |
yes | Where shell_user comes from |
reported_user |
string | yes | The account the device was joined with |
console_user |
string | yes | The account the console set; empty for none |
root_allowed |
boolean | yes | The device was joined to take root from the console |
may_shell |
boolean | yes | The account may open a shell: it has device.shell and agent.terminal, and the terminal client feature is not turned off for it |
| 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 |
| 404 | There is no such device |
| 500 | The server could not answer |
Set the account a device without a desktop runs its shell as; an empty name goes back to the one it was joined with.
The device gets the account with its next policy and uses it from then on. Root (or SYSTEM on Windows) only on a device joined to take root. Written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.edit and device.shell. neodesk devices shell-user calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
shell_user |
string | yes | A Linux account name, or a Windows one with its domain (DOMAIN\user, user@domain); no spaces or quotes. Empty for the account the device was joined with; at most 64 characters |
200: Done (application/json)
The device's shell as devices shell shows it, without may_shell
| Field | Type |
|---|---|
headless |
boolean |
shell_user |
string |
source |
string, one of console, device, none |
reported_user |
string |
console_user |
string |
root_allowed |
boolean |
| Error | When |
|---|---|
| 400 | shell_user is missing or not an account name (invalid_user) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account lacks device.edit or device.shell, or does not see the device |
| 404 | There is no such device |
| 409 | The device has a desktop (not_headless), or root for a device that was not joined to take it (root_not_allowed) |
Show whether sign-in details are saved for a device, for which account, and who saved them (never the password).
Needs device.signin_use or device.signin_manage.
Needs device.signin_manage. neodesk devices signin calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
DeviceSigninStatus and object.
| 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 |
| 404 | There is no such item, or the account does not see it |
Save or replace the account name and password the browser viewer types at a device's lock screen.
Stored encrypted; no answer shows the password again. Keeps the automatic sign-in setting on a replace. Written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.signin_manage. neodesk devices signin-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
username |
string | yes | The account name; no control characters; at most 256 characters |
password |
string | yes | No control characters, and only characters a keyboard can type one key at a time; at most 256 characters |
form |
string, one of password, name_password |
What the sign-in screen asks for (default password, or as saved before) |
200: Done (application/json)
DeviceSigninStatus and object.
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 503 | The server's device vault is not set up (vault_unavailable) |
Turn automatic sign-in at the device's lock screen on or off, or set what its sign-in screen asks for.
Give auto, form or both. Written to the audit log. The console passes the server's refusal on as {"success": false, "error": code}.
Needs device.signin_manage. neodesk devices signin-auto calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type |
|---|---|
auto |
boolean |
form |
string, one of password, name_password |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | The device does not exist, or no sign-in details are saved (not_set) |
Delete the sign-in details saved for a device.
Written to the audit log.
Needs device.signin_manage. neodesk devices signin-clear calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
DeviceSigninStatus and object.
| 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 |
| 404 | There is no such item, or the account does not see it |
Replace a device's tags.
Tags are trimmed, empty ones dropped, and each cut to 50 characters.
Needs device.edit. neodesk devices tags-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
tags |
array of string | yes | at most 20 items |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.tags |
array of string | The tags as stored |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
| 404 | There is no such item, or the account does not see it |
Queue an allowed command for a device's next heartbeat.
Each command needs its own permission too: the collections device.edit, files.browse and files.read agent.files, service.control and process.terminate device.connect with the remote control client feature.
Needs device.edit. neodesk devices telemetry-command calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
command |
string, one of collect.hardware, collect.metrics, collect.services, collect.processes, collect.events, collect.activity, files.browse, files.read, service.control, process.terminate |
yes | |
args |
object or array | The command's arguments |
202: Queued (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.accepted |
boolean | |
data.command_id |
integer | |
data.device_id |
string |
| Error | When |
|---|---|
| 400 | The command is not allowed (command_not_allowed), or the server refused it |
| 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 |
| 404 | There is no such item, or the account does not see it |
Ask a device's agent for fresh system details.
The server queues a hardware inventory for the device.
Needs device.edit. neodesk devices telemetry-refresh calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
202: Queued (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.accepted |
boolean | |
data.command_id |
integer | |
data.device_id |
string |
| 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 |
| 404 | There is no such item, or the account does not see it |
| 502 | The server refused |
Lift the ban of a device.
Needs device.ban. neodesk devices unban calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
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 or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 502 | The server did not change the ban |
Take a revoked or blocked device ID off the server's blocklist, so the computer can register and join again.
Needs device.delete. neodesk devices unblock calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The device ID (see devices list) |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
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 or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | The ID is not on the blocklist |
| 502 | The server could not answer |