Console: keys
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
The server's key, the client settings and the QR code.
Show the console's API key, masked. API tokens never see it whole.
Answers the key with its middle masked (the first and last four characters at most, **** between). With show=true it answers the whole key, which only a super admin may see.
neodesk keys api calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
show |
query | string, one of true |
true answers the whole key |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.key |
string | yes | The API key, masked unless show=true |
data.masked |
boolean | 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 show=true came from an account that is not a super admin |
| 404 | The server has no API key file |
Show the server's public key, which clients need.
neodesk keys public calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.key |
string | yes | The Ed25519 public key in base64 |
| 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 server has no public key yet |
Download the server's public key as id_ed25519.pub.
Answers the key as a text file named id_ed25519.pub.
neodesk keys public-download calls it.
200: The public key (text/plain)
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 | The server has no public key yet |
Show the client settings as a QR code (PNG data address).
The code holds the ID server, relay, API address and public key a mobile client scans to configure itself.
neodesk keys qr calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
host |
query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ClientConfigQR | 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 server has no public key yet |
Show the client settings as a QR code (the older address of keys qr).
The code holds the ID server, relay, API address and public key a mobile client scans to configure itself. Answers the same as GET /api/keys/public/qr.
neodesk keys qr-legacy calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
host |
query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ClientConfigQR | 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 server has no public key yet |
Show the ID server, relay and API addresses clients get.
Also says where each address came from and answers the masked API key.
neodesk keys server-info calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
host |
query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ClientEndpoints | 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 |