Console: pairing
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
Pairing codes for NeoDesk Desktop and NeoDesk Companion.
Approve a waiting NeoDesk Companion under a name.
A Companion that waits for approval is approved under the name; a device the server knows already gets the name. With folder_id the device goes into that folder, which must be open to the account. A known device must be one the account sees. A refusal of the server API is answered with 502 and its answer.
Needs enrollment.approve. neodesk pairing activate calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
device_id |
string | yes | Letters, digits and _ . : -, 3 to 128 of them |
display_name |
string | Cut to 120 characters | |
folder_id |
integer or string | Put the device into this folder |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
device_id |
string | yes |
| Error | When |
|---|---|
| 400 | invalid_device_id |
| 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 | The device scope could not be read |
| 502 | The server API refused, or the folder could not be assigned |
List pairing codes for NeoDesk Desktop and NeoDesk Companion.
Oldest first, without the codes themselves.
Needs enrollment.approve. neodesk pairing list calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
codes |
array of PairingCode | 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 |
| 502 | The server API did not answer or refused |
Make a pairing code.
A code is 6 characters, works once and expires after 10 minutes. The answer holds the code, the only time it is shown.
Needs enrollment.approve. neodesk pairing create calls it.
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
label |
string | What it is for, cut to 64 characters |
201: Created (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 |
| 413 | The body is larger than 4 kB |
| 502 | The server API did not answer or refused |
Delete a pairing code.
Needs enrollment.approve. neodesk pairing delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The code ID (see pairing list): 8 to 32 hex digits |
200: Done (application/json)
| Field | Type |
|---|---|
success |
true |
id |
string |
| 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 |
| 502 | The server API did not answer or refused |
Show the address NeoDesk Desktop and NeoDesk Companion pair with.
Needs enrollment.approve. neodesk pairing host calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
host |
string | 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 |