Konsole: registrations
Als Markdown kopierenDiese 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.
Devices that asked to register.
List devices that asked to register.
Newest first. total counts the registrations of every page.
Needs enrollment.approve. neodesk registrations list calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
status |
query | string, one of pending, approved, rejected |
|
search |
query | string | Keep registrations whose device ID, host name or address holds this text |
limit |
query | integer | default 500, at least 1, at most 500 |
offset |
query | integer | default 0, at least 0 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
array of LanRegistration and object | |
total |
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 |
| 500 | A database error |
Count waiting registrations.
Adds the waiting registrations and the devices in the server API's enrollment queue. A source that fails counts 0.
Needs enrollment.approve. neodesk registrations count calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
count |
integer | 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 |
Show the enrollment mode and which approval options the console offers.
mode is the server API's enrollment mode, open when it gives none. rich_approve and tag_picker are the enrollment_rich_approve and enrollment_tag_picker settings, true unless set otherwise.
Needs enrollment.approve. neodesk registrations options calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | |
data.mode |
string, one of open, managed, locked |
|
data.rich_approve |
boolean | |
data.tag_picker |
boolean |
| 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 |
| 500 | A database error |
Show a registration.
Needs enrollment.approve. neodesk registrations get calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The registration ID (see registrations list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
LanRegistration |
| 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 |
Delete a registration.
Needs enrollment.manage. neodesk registrations delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The registration ID (see registrations list); at least 1 |
200: Done (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 |
Approve a registration.
Approves a waiting registration. The device gets the console address, the signal server address and the server key when it polls, and its device token on the first poll. When the server already has the device, it goes into the folder and device groups and gets the display name and tags. A device ID that is already a device of the server, also a deleted one, needs confirm_existing_device; without it the route answers 409 with code existing_device. The account must see that device, or the route answers 403. When the folder or the device groups can't be assigned, the registration stays approved and the route answers 500 with the registration in data.
Needs enrollment.approve. neodesk registrations approve calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The registration ID (see registrations list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
folder_id |
integer or string | Put the device into this folder |
group_guids |
array of string | Make the device a member of these manual device groups and of no other manual group the account sees; at most 100 |
display_name |
string | |
tags |
string | Comma-separated tags |
confirm_existing_device |
boolean | Confirm that the approval moves and renames a device the server already has |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
LanRegistration |
| Error | When |
|---|---|
| 400 | The registration is not waiting, or display_name or tags is not 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 item, or the account does not see it |
| 409 | The device ID is already a device of the server and confirm_existing_device is not true |
| 500 | Approved, but the folder or the device groups could not be assigned |
Reject a registration.
Needs enrollment.approve. neodesk registrations reject calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The registration ID (see registrations list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
reason |
string | Cut to 500 characters |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
LanRegistration |
| Error | When |
|---|---|
| 400 | The registration is not waiting |
| 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 |