Doku durchsuchen
Menü
Geändert am Auf GitHub bearbeiten

Konsole: companion

Als Markdown kopieren

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als Authorization: Bearer ndt_...; siehe API-Tokens. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

NeoDesk Companion: releases, templates, installer files and the silent install.

GET /api/companion-releases

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

GET /api/companion-releases/auto-import

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

PUT /api/companion-releases/auto-import

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

GET /api/companion-releases/rollout

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

PUT /api/companion-releases/rollout

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

GET /api/companion-releases/signing-status

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

POST /api/companion-releases/sync

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

GET /api/companion-templates

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

POST /api/companion-templates

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 /api/companion-templates/{id}

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)

ConsoleSuccess.

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

POST /api/panel/companion/installer

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

GET /api/panel/companion/setup

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

GET /api/portal/installers

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

Durchsucht Seiten, Abschnitte, Befehle und Einstellungen.