Server-API: pairing codes
Als Markdown kopierenDiese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in X-API-Key oder ein Anmelde-Token; siehe Die HTTP-API. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.
Short one-time codes a person types into NeoDesk Desktop or NeoDesk Companion to configure it for this server.
List pairing codes that can still be redeemed.
Oldest first, without the codes themselves. Only the codes of NeoDesk Desktop and NeoDesk Companion pairing; join and support codes are not in the list.
On the server API, port 21114. Needs enrollment.approve.
200: Done (application/json)
| Field | Type |
|---|---|
success |
true |
codes |
array of PairingCode |
count |
integer |
| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
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; the server keeps only its hash.
On the server API, port 21114. Needs enrollment.approve.
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 credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 500 | The code could not be made or stored |
Delete a pairing code before it is used.
On the server API, port 21114. Needs enrollment.approve.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The code ID (see GET /api/pairing/codes) |
200: Done (application/json)
| Field | Type |
|---|---|
success |
true |
id |
string |
| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | pairing code not found |