Console: companion
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
NeoDesk Companion: releases, templates, installer files and the silent install.
List the NeoDesk Companion releases this server keeps.
The releases in the local cache, highest version first.
Needs enrollment.manage. neodesk companion releases calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
releases |
array of CompanionRelease | 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 automatic import of NeoDesk Companion releases.
Whether the server imports new Companion releases by itself (every 6 hours), what the last look did, the release installed Companions update to, and how many Companions run which version.
Needs enrollment.manage. neodesk companion auto-import calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
paused |
boolean | yes | The automatic import is paused; importing by hand still works |
paused_by |
string | ||
paused_at |
string (date-time) | ||
last_check |
string (date-time) | When the automatic import last asked GitHub | |
last_result |
string, one of imported, up_to_date, failed |
||
last_import |
string | The tag of the release imported last, automatically or by hand | |
last_import_at |
string (date-time) | ||
last_error |
string | ||
interval_hours |
integer | yes | How often the automatic import looks for a new release |
offered |
string or null | yes | The release installed Companions update to: the newest one imported with its signed manifest |
versions |
array of object | yes | The Companions seen in the last 90 days, by kind and version |
versions[].kind |
string, one of generic, embedded |
yes | |
versions[].version |
string | yes | |
versions[].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 |
Pause or resume the automatic import of NeoDesk Companion releases.
Needs enrollment.manage. neodesk companion auto-import-set calls it.
Request body, application/json:
| Field | Type | Required |
|---|---|---|
paused |
boolean | yes |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
paused |
boolean | yes | The automatic import is paused; importing by hand still works |
paused_by |
string | ||
paused_at |
string (date-time) | ||
last_check |
string (date-time) | When the automatic import last asked GitHub | |
last_result |
string, one of imported, up_to_date, failed |
||
last_import |
string | The tag of the release imported last, automatically or by hand | |
last_import_at |
string (date-time) | ||
last_error |
string | ||
interval_hours |
integer | yes | How often the automatic import looks for a new release |
offered |
string or null | yes | The release installed Companions update to: the newest one imported with its signed manifest |
versions |
array of object | yes | The Companions seen in the last 90 days, by kind and version |
versions[].kind |
string, one of generic, embedded |
yes | |
versions[].version |
string | yes | |
versions[].count |
integer | yes |
| 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 |
Show Companion update groups, signed release pins and device results.
Requires an administrator. Returns Pilot and Production targets, group result counts, device assignments and the available signed release tags.
Needs enrollment.manage. neodesk companion rollout calls it.
200: Companion rollout state
| 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 |
Assign, pin, promote or roll back a Companion update group.
Requires an administrator. Assign uses device_id and group (an empty string restores automatic updating). Pin and rollback use group, tag and expected_tag. Promote uses the pilot tag and the expected production tag. For an unpinned group use an empty expected_tag.
Needs enrollment.manage. neodesk companion rollout-set calls it.
Request body, application/json:
| Field | Type | Required |
|---|---|---|
action |
one of assign, pin, promote, rollback |
yes |
device_id |
string | |
group |
one of ``, pilot, production |
|
tag |
string | |
expected_tag |
string |
200: Updated Companion rollout state
| Error | When |
|---|---|
| 400 | Invalid action or missing parameters |
| 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 | The release, device, or group does not meet the action requirements |
Show the key NeoDesk Companion release manifests must be signed with.
Needs enrollment.manage. neodesk companion release-signing calls it.
200: Done (application/json)
| Field | Type | What it is |
|---|---|---|
success |
true |
|
fingerprint |
string | |
source |
string, one of bundled, environment |
bundled, or environment when the server's environment sets the key |
| 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 |
Fetch the newest NeoDesk Companion release from GitHub.
Imports the newest release from GitHub after checking the manifest's signature and the size and SHA-256 of every file. It can take minutes and runs on even when the caller stops waiting.
Needs enrollment.manage. neodesk companion releases-sync calls it.
201: Imported (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
tag |
string | yes |
manifest |
object |
| 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 |
| 409 | The newest release is imported already, or not newer than the cache's |
| 502 | GitHub could not be reached or a check failed |
List Companion templates.
Newest first. A read-only API token gets each enrollment token cut to its first 8 characters and "…".
Needs enrollment.manage. neodesk companion templates calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
templates |
array of object | yes | |
templates[].id |
integer | ||
templates[].name |
string | ||
templates[].description |
string or null | ||
templates[].enrollment_token |
string | The token a Companion enrolls with | |
templates[].created_at |
string (date-time) | ||
templates[].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) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | The templates could not be read |
Make a Companion template: settings new Companions start with.
The answer holds the new enrollment token, 48 hex digits.
Needs enrollment.manage. neodesk companion template-create calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | yes | Trimmed, at most 100 characters; at most 100 characters |
description |
string | Cut to 500 characters | |
config |
object or array | The settings a Companion that enrolls with the template gets; {} when it is no object or list |
201: Created (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
enrollment_token |
string | yes |
| Error | When |
|---|---|
| 400 | name_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 |
| 409 | name_exists: another template has the name (SQLite only; PostgreSQL answers 500) |
| 500 | The template could not be stored |
Delete a Companion template.
Deletes the template, and with it its enrollment token: enrollment and registration no longer take it. A device already enrolled keeps its own token.
Needs enrollment.manage. neodesk companion template-delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The template ID (see companion templates); at least 1 |
200: Deleted (application/json)
| Error | When |
|---|---|
| 400 | invalid_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 |
| 404 | template_not_found |
Download the NeoDesk Companion MSI with an install.cmd for this server as a zip.
The zip holds neodesk-companion.msi, unchanged from the release, and install.cmd, which runs msiexec with the properties SERVER, KEY, API, TOKEN and GROUP. The token must be one a new computer can still join with. Errors carry a code.
Needs enrollment.manage. neodesk companion silent-installer calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
token |
string | yes | The enrollment token the computer joins with; write only |
group |
integer or string | The folder ID the computer goes into | |
arch |
string, one of x86_64, aarch64 |
default "x86_64" |
200: The zip (application/zip)
String (binary).
| Error | When |
|---|---|
| 400 | invalid_body, invalid_token, token_unknown, token_used, token_full or invalid_group |
| 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 | no_release: no imported release has an MSI for arch |
| 500 | server_error |
Show the values of a silent install of NeoDesk Companion and the MSI it uses.
release is the newest imported release with its Windows MSIs, null when there is none or it has no MSI.
Needs enrollment.manage. neodesk companion silent-setup calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
server |
object | yes | |
server.id_server |
string | The ID server address (MSI property SERVER) | |
server.key |
string | The server key (KEY) | |
server.api_server |
string | The API address (API) | |
release |
object or null | yes | |
release.tag |
string | ||
release.packages |
array of object | ||
release.packages[].arch |
string, one of x86_64, aarch64 |
||
release.packages[].name |
string | ||
release.packages[].size |
integer | Bytes |
| 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 NeoDesk Companion installer files this server serves.
Public: the download portal calls it without a sign-in. The files of the newest imported release with their addresses on this server. An empty list says why in reason. Counts against the limit of file downloads.
neodesk companion installers calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
release |
string or null | The release tag, null when there is none | |
reason |
string or null, one of no_release_imported, release_cache_incomplete, null |
Why the list is empty; null when it is not | |
installers |
array of object | yes | |
installers[].platform |
string | ||
installers[].arch |
string | ||
installers[].url |
string | Where to download the file | |
installers[].format |
string | portable when the manifest names none | |
installers[].release |
string |
| Error | When |
|---|---|
| 429 | Too many requests: wait for the seconds in Retry-After |
| 500 | The cached manifest is broken |