Console: branding
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
The console's look: logo, colors, profiles and fonts.
Show the console's branding settings.
The stored settings, whatever the branding mode, with the appearance model made from them and the readability checks. Any signed-in account may read them.
neodesk branding show calls it.
200: Done (application/json)
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Change branding settings: give the fields to change.
Give the settings to change, flat by their names or nested as {"appearance": {...}}. Nothing is stored when a value is refused. A body of only themeMode, colors and glassColor is written to the audit log as a theme switch.
Needs branding.edit. neodesk branding set calls it.
Request body, application/json:
Settings flat by name, or nested under appearance
| Field | Type | What it is |
|---|---|---|
appearance |
ConsoleAppearance | |
appName |
string | |
appDescription |
string | |
logoType |
string | |
logoIcon |
string | |
logoSvg |
string | |
logoUrl |
string | |
logoText |
string | |
logoTextAccent |
string | |
fontHeading |
string | |
fontBody |
string | |
faviconSvg |
string | |
bgType |
string | |
bgColor |
string | |
bgGradient |
string | |
bgImageUrl |
string | |
bgBlur |
string | |
bgOverlay |
string | |
bgSize |
string | |
glassEnabled |
string | |
glassColor |
string | |
glassBlur |
string | |
glassOpacity |
string | |
loginBgType |
string | |
loginBgColor |
string | |
loginBgGradient |
string | |
loginBgImageUrl |
string | |
loginBgOverlay |
string | |
loginTitle |
string | |
loginSubtitle |
string | |
loginPromoMode |
string | |
loginSlides |
array of object | The slides of the sign-in page |
footerText |
string | |
showPoweredBy |
string | |
agentBgType |
string | |
agentBgColor |
string | |
agentBgGradient |
string | |
agentBgImageUrl |
string | |
agentShowPoweredBy |
string | |
customCss |
string | |
appearanceSchemaVersion |
string | |
themeMode |
string | |
colors |
object | Color names such as bgPrimary or accentBlue and their values |
rdclientBgType |
string | |
rdclientBgColor |
string | |
rdclientBgGradient |
string | |
rdclientBgImageUrl |
string | |
rdclientBgOverlay |
string | |
rdclientBgSize |
string |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The body is not an object ("Invalid branding data"), or values a save would change or drop. The answer to the second names each field with its reason |
| 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 |
List the background pictures.
The uploaded background pictures, newest first.
neodesk branding backgrounds calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
array of object | yes | |
data[].name |
string | yes | |
data[].url |
string | yes | The address on the console, such as /uploads/bg-<16 hex>.png |
data[].size_bytes |
integer | yes | In bytes |
data[].updatedAt |
string (date-time) | yes | |
data[].inUse |
boolean | yes | Whether the stored settings or a saved profile use the picture. Such a picture cannot be deleted |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Delete an uploaded background picture.
Deletes a background picture that neither the stored settings nor a saved profile use (inUse false in the list).
Needs branding.edit. neodesk branding background-delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
name |
path | string | yes | The file name, such as bg-<16 hex>.png |
200: Deleted (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 | No uploaded background of that name ("Picture not found") |
| 409 | The settings or a saved profile use the picture ("Picture is in use") |
Export the branding as JSON (use --output).
Answers with Content-Disposition attachment; filename="neodesk-theme.json".
Needs branding.edit. neodesk branding export calls it.
200: The theme file (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 |
Import branding from exported JSON (give it with --data @file.json).
Applies a theme file such as the export answers. Values are cut to their length limits and stored as a save stores them.
Needs branding.edit. neodesk branding import calls it.
Request body, application/json:
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The body is not a theme file ("Invalid theme preset file") |
| 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 |
List saved branding profiles.
By name, without their settings.
neodesk branding profiles calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
array of object | yes | |
data[].id |
integer | yes | |
data[].name |
string | yes | |
data[].description |
string or null | ||
data[].is_active |
integer or boolean | 1 or 0 on SQLite, true or false on PostgreSQL | |
data[].created_at |
string (date-time) | ||
data[].updated_at |
string (date-time) |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Save the branding as a profile.
Needs branding.edit. neodesk branding profile-create calls it.
Request body, application/json:
Without branding the profile keeps the current settings.
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | yes | Trimmed and cut at 80 characters; at most 80 characters |
description |
string | Cut at 200 characters; at most 200 characters | |
branding |
object | The settings to keep in the profile, flat or nested |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | No name, or a name or description that 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 |
| 409 | A profile has this name |
Change a branding profile.
A field left out stays as it is.
Needs branding.edit. neodesk branding profile-set calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The profile's id, a whole number |
Request body, application/json:
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The id or a field is not valid, or there is no such profile ("Profile not found") |
| 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 |
| 409 | A profile has this name |
Delete a branding profile.
Needs branding.edit. neodesk branding profile-delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The profile's id, a whole number |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The id is no whole number |
| 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 profile |
Use a saved branding profile.
The profile's settings become the current settings.
Needs branding.edit. neodesk branding profile-apply calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The profile's id, a whole number |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ConsoleBrandingSettings | yes |
revision |
string | yes |
| Error | When |
|---|---|
| 400 | The id is no whole number |
| 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 profile, or its settings can't be used |
Copy a branding profile.
Needs branding.edit. neodesk branding profile-copy calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The profile's id, a whole number |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
name |
string | The copy's name; "<name> (copy)" when left out |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The id or the name is not valid, or there is no such profile |
| 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 |
| 409 | A profile has this name |
Go back to the built-in branding.
Deletes every stored setting, so the defaults apply. With removePictures true, the uploaded logos and background pictures that no saved profile uses are deleted too.
Needs branding.edit. neodesk branding reset calls it. It cannot be undone.
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
removePictures |
boolean | Also delete the uploaded pictures no saved profile uses |
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 |
List the fonts the console can use.
The fonts the console offers that match the search.
neodesk branding fonts calls it.
| Parameter | In | Type | What it is |
|---|---|---|---|
q |
query | string | Part of the family name; cut at 100 characters; at most 100 characters |
category |
query | string | Cut at 20 characters; default "all", at most 20 characters |
source |
query | string, one of curated, google |
google adds the typed name itself as a font to fetch, and the fonts the server fetched the list of; at most 80 fonts then; default "curated" |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
array of object | yes | |
data[].family |
string | yes | |
data[].category |
string | ||
data[].variants |
array of string | Weights such as "400" | |
data[].downloaded |
boolean | Whether the font is installed on this server | |
data[].source |
string |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Install a font from Google Fonts.
Fetches the font's latin .woff2 files from Google Fonts and installs them with a font.css. For a font of the console's list the weights it doesn't have are dropped; for any other font every weight that is not three digits.
Needs branding.edit. neodesk branding font-download calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
family |
string | yes | |
weights |
array of string | default ["400","500","600","700"] |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.success |
boolean | yes | false when no file could be fetched |
data.path |
string | yes | |
data.files |
array of string | yes | |
data.cssPath |
string | yes |
| Error | When |
|---|---|
| 400 | No family ("Font family is required") |
| 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 | Google Fonts could not be reached or answered an error |
List the fonts installed on this server.
By folder name.
neodesk branding fonts-local calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
array of object | yes | |
data[].family |
string | yes | |
data[].safeName |
string | yes | The font's folder name |
data[].category |
string | ||
data[].cssPath |
string | yes | Such as /fonts/<safeName>/font.css |
data[].weights |
array of string | ||
data[].fileCount |
integer |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
Delete an installed font.
Needs branding.edit. neodesk branding font-delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
family |
path | string | yes | The font's family or folder name. It is decoded once more after the path, so Open%2520Sans names Open Sans |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
deleted |
boolean | yes | false when the font was not installed |
| 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 |
Use a built-in theme.
A built-in theme becomes the current settings.
Needs branding.edit. neodesk branding theme-apply calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | string | yes | The theme's id: letters, digits, _ and - |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The id or the theme's file 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 theme |