Skip to content

API

The Dracal Device Service provides access to a REST JSON API for interacting with connected devices. This API allows you to query device information, retrieve sensor readings, and access device configurations programmatically.

Default port

This service uses port 11395 by default. You can change the port if needed.

Security note

The Dracal Device Service HTTP server only accepts local connections to the REST JSON API. Remote connections are rejected for security reasons.

3.5.0

Get USB Devices

GET http://localhost:11395/3.5.0/devices/usb

Returns information about all USB-connected devices, including their channels, configurations, and current readings.

Authentication: None required

Response Format: JSON

Response Structure:

The response contains two main sections:

  • devices: Dynamic data for each connected device instance

    • Each device is keyed by its serial number (e.g., E22377)
    • Contains real-time channel values, current connection details, and sensor measurements
    • This data changes as devices report new measurements
  • products: Static product model definitions

    • Describes the specifications and capabilities of each product model (e.g., VCP-BAR20-CAL/v1)
    • Only includes models for currently connected devices
    • Defines available channels, units, and device properties
    • This data does not change and serves as a reference for device capabilities

Example Response:

{
    "devices": {
        "E22377": {
            "channel_list": [
                "temperature"
            ],
            "channels": {
                "temperature": {
                    "period_ms": 100,
                    "value": {
                        "magnitude": 121.5538101196289,
                        "timestamp": "2025-12-12T01:48:28.714Z",
                        "unit": "°C"
                    }
                }
            },
            "config": {
                "protocol": {
                    "usb": true,
                    "vcp": true
                }
            },
            "connections": {
                "usb": {
                    "address": 20,
                    "bus": 2,
                    "product_id": "0504",
                    "vendor_id": "289B"
                },
                "vcp": null
            },
            "info": {
                "firmware_version_major": 2,
                "firmware_version_minor": 4,
                "product": "VCP-RTD300-CAL",
                "serial": "E22377",
                "vendor": "Dracal technologies inc."
            },
            "model": "VCP-RTD300-CAL/v1"
        }
    },
    "products": {
        "VCP-RTD300-CAL/v1": {
            "channels": {
                "temperature": {
                    "description": "Temperature",
                    "details": {
                        "virtual": false
                    },
                    "label": "temperature",
                    "type": "Temperature",
                    "unit": "°C"
                }
            },
            "info": {
                "interfaces": {
                    "usb": "tenkiusb",
                    "vcp": "tenkivcp"
                },
                "name": "VCP-RTD300-CAL",
                "sku": "605048",
                "vendor": "Dracal technologies inc."
            },
            "model": "VCP-RTD300-CAL/v1"
        }
    }
}

Get Service Information

GET http://localhost:11395/dracal-service-info

Returns information about the Dracal Device Service, including its name, status, and version.

Authentication: None required

Response Format: JSON

Response Structure:

  • service_name (string): Name of the service
  • status (string): Current status (ok or error status)
  • version (object): Version information
    • major (integer): Major version number
    • minor (integer): Minor version number
    • patch (integer): Patch version number
    • tag (string): Release tag
    • tweak (integer): Tweak version number

Example Response:

{
  "service_name": "dracal-device-service",
  "status": "ok",
  "version": {
    "major": 3,
    "minor": 5,
    "patch": 0,
    "tag": "v3.5.0",
    "tweak": 0
  }
}


Use the navigation menu on the left to explore the full documentation.