Device Manager#

Introduction#

The Device Manager API provides a comprehensive interface to manage devices within the ScanHub system. This API allows you to perform essential operations such as reading the device health, retrieving, creating, updating, and deleting devices. Below are the key endpoints:

Web API#

GET /api/v1/device/health/readiness#

Readiness

Readiness health endpoint.

Inspects SQLAlchemy engine and checks if the device table exists.

Status Codes:
  • 200 OK – Successful Response

GET /api/v1/device/#

Get Devices

Retrieve the list of registered devices.

Returns#

List[Device]: The list of registered devices.

status 200:

Successful Response

GET /api/v1/device/{device_id}#

Get Device

Retrieve a specific device.

Args#

device_id (str): The ID of the device.

Returns#

dict: The response containing the information about the device

param string device_id:

status 200:

Successful Response

status 422:

Validation Error

DELETE /api/v1/device/{device_id}#

Delete Device

Delete a device.

Args#

device_id (str): The ID of the device.

Returns#

dict: The response indicating the success or failure of the deletion.

param string device_id:

status 204:

Successful Response

status 422:

Validation Error

POST /api/v1/device/createdevice#

Create Device

Create device database entry.

Only devices which are created by a user via this endpoint and have the device_id and device_token that result from this call configured correctly can later connect and register.

Parameters#

request:

DeviceCreationRequest to create device in Scanhub. Further details of the device are later provided by the device itself.

Return#

device_token:

the token of the device which the user should copy manually to the configuration file of the device.

device_id:

the id of the device, should be copied to the devices config file together with the device_token.

status 201:

Successful Response

status 422:

Validation Error

PUT /api/v1/device/parameter/{device_id}#

Update acquisition/device parameter

Update acquisition/device parameter.

Parameters#

device_id

Id of the device to be updated

payload

Parameter dictionary

Returns#

Parameter dictionary

Raises#

HTTPException

404: Not found

param {‘string’, ‘uuid’} device_id:

status 200:

Successful Response

status 422:

Validation Error

POST /api/v1/device/start_scan_via_websocket#

Start Scan Via Websocket

Start a scan via a websocket that was already opened by the device.

Parameters#

device_task

Details of the scan and the device to scan on.

status 200:

Successful Response

status 422:

Validation Error

License#

Device Manager, including all its source code and associated documentation (collectively, the “Software”), is dual-licensed under the GNU General Public License version 3 (GPLv3) and the ScanHub commercial license.

Open Source License#

If you want to use the Software under the terms of the GPLv3, you may do so for free. Under the GPLv3, you are allowed to modify and distribute the Software, but any derivative works that you distribute must also be licensed under the GPLv3. For the precise terms and conditions, please refer to the text of the GPLv3, which is included with the Software and can also be found at: http://www.gnu.org/licenses/gpl-3.0.html

Commercial License#

If you wish to use the Software without the restrictions of the GPLv3, such as for the purpose of developing proprietary software that includes the Software without the obligation to disclose your source code, you may purchase a commercial license from BRAIN-LINK UG (haftungsbeschränkt).

The commercial license grants you, the licensee, the rights to use, modify, and distribute the Software without the requirement of providing the source code of your proprietary software to the end users. The commercial license also includes access to premium support and services.

For more information on the commercial license, including pricing, please contact us at info@brain-link.de.

Choice of License#

You may choose to use the Software under either the GPLv3 or the commercial license. If you choose to use the Software under the GPLv3, you must comply with all of the terms of the GPLv3. If you choose to use the Software under the commercial license, you must comply with all of the terms of the commercial license.

Disclaimer#

This is not a legal document. The exact terms of the GPLv3 and the commercial license are specified in their respective legal texts. This document is merely intended to provide a general overview of the dual licensing scheme.