Skip to content

3.7.0

Backward Compatibility

We encourage you to use the latest version of the API. However, all previous versions remain available, so once you integrate, you can upgrade at your own pace.

Default port

This service uses port 11395 by default. You can change the port if needed. See Changing the HTTP port for instructions.

Security note

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

Get USB Devices

Request

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

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

Authentication: None required

Response Format: JSON

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

  • 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

{
    "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 All USB Measurements

Request

GET http://localhost:11395/3.7.0/devices/usb/measurements

Returns a compact list of the latest measurement from every connected USB device. Each entry contains only the serial number, timestamp, and channel values — without device metadata or product definitions.

Authentication: None required

Response Format: JSON

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

A JSON array where each element represents one connected device:

  • serial (string): Device serial number
  • timestamp (string): ISO 8601 timestamp of the measurement
  • values (object): Channel readings keyed by channel name
    • Each channel contains:
      • magnitude (number): The measured value
      • unit (string): The unit of measurement

Example

[
  {
    "serial": "E22377",
    "timestamp": "2026-03-18T16:30:22.770Z",
    "values": {
      "temperature": {
        "magnitude": 21.997983932495117,
        "unit": "°C"
      }
    }
  },
  {
    "serial": "E22421",
    "timestamp": "2026-03-18T16:30:22.790Z",
    "values": {
      "altitude": {
        "magnitude": -132426.234375,
        "unit": "mm"
      },
      "atmospheric_pressure": {
        "magnitude": 102.9260025024414,
        "unit": "kPa"
      },
      "dew_point": {
        "magnitude": -5.453139305114746,
        "unit": "°C"
      },
      "heat_index": {
        "magnitude": 23.33905601501465,
        "unit": "°C"
      },
      "humidex": {
        "magnitude": 23.33905601501465,
        "unit": "°C"
      },
      "relative_humidity": {
        "magnitude": 14.26108169555664,
        "unit": "%rh"
      },
      "temperature": {
        "magnitude": 23.33905601501465,
        "unit": "°C"
      }
    }
  }
]

Get USB Measurement

Request

GET http://localhost:11395/3.7.0/devices/usb/{serial}/measurement

Returns the latest measurement for a single USB device identified by its serial number.

Authentication: None required

Response Format: JSON

Path Parameters:

Parameter Type Description
serial string The serial number of the device (e.g., E22377)

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

  • serial (string): Device serial number
  • timestamp (string): ISO 8601 timestamp of the measurement
  • values (object): Channel readings keyed by channel name
    • Each channel contains:
      • magnitude (number): The measured value
      • unit (string): The unit of measurement

Example

{
  "serial": "E22377",
  "timestamp": "2026-03-18T16:31:00.369Z",
  "values": {
    "temperature": {
      "magnitude": 22.36371421813965,
      "unit": "°C"
    }
  }
}

Get SensGate Devices

Request

GET http://localhost:11395/3.7.0/devices/sensgate

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

Authentication: None required

Response Format: JSON

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

  • devices: Dynamic data for each connected device instance

    • Each device is keyed by its serial number
    • 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
    • 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

{
    "devices": {
        "F10042": {
            "channel_list": ["temperature", "relative_humidity"],
            "channels": {
                "temperature": {
                    "period_ms": 1000,
                    "value": {
                        "magnitude": 23.5,
                        "timestamp": "2026-03-18T16:30:22.000Z",
                        "unit": "°C"
                    }
                },
                "relative_humidity": {
                    "period_ms": 1000,
                    "value": {
                        "magnitude": 45.2,
                        "timestamp": "2026-03-18T16:30:22.000Z",
                        "unit": "%rh"
                    }
                }
            },
            "config": { "protocol": { "sensgate": true } },
            "connections": {
                "sensgate": { "gateway_serial": "G00001", "node_id": 3 }
            },
            "info": {
                "firmware_version_major": 1,
                "firmware_version_minor": 0,
                "product": "SNG-TH100",
                "serial": "F10042",
                "vendor": "Dracal technologies inc."
            },
            "model": "SNG-TH100/v1"
        }
    },
    "products": {
        "SNG-TH100/v1": {
            "channels": {
                "temperature": {
                    "description": "Temperature",
                    "details": { "virtual": false },
                    "label": "temperature",
                    "type": "Temperature",
                    "unit": "°C"
                },
                "relative_humidity": {
                    "description": "Relative Humidity",
                    "details": { "virtual": false },
                    "label": "relative_humidity",
                    "type": "RelativeHumidity",
                    "unit": "%rh"
                }
            },
            "info": {
                "interfaces": { "sensgate": "sensgate" },
                "name": "SNG-TH100",
                "sku": "700001",
                "vendor": "Dracal technologies inc."
            },
            "model": "SNG-TH100/v1"
        }
    }
}

Get All SensGate Measurements

Request

GET http://localhost:11395/3.7.0/devices/sensgate/measurements

Returns a compact list of the latest measurement from every connected SensGate device. Each entry contains only the serial number, timestamp, and channel values — without device metadata or product definitions.

Authentication: None required

Response Format: JSON

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

A JSON array where each element represents one connected device:

  • serial (string): Device serial number
  • timestamp (string): ISO 8601 timestamp of the measurement
  • values (object): Channel readings keyed by channel name
    • Each channel contains:
      • magnitude (number): The measured value
      • unit (string): The unit of measurement

Example

[
  {
    "serial": "F10042",
    "timestamp": "2026-03-18T16:30:22.000Z",
    "values": {
      "temperature": {
        "magnitude": 23.5,
        "unit": "°C"
      },
      "relative_humidity": {
        "magnitude": 45.2,
        "unit": "%rh"
      }
    }
  }
]

Get SensGate Measurement

Request

GET http://localhost:11395/3.7.0/devices/sensgate/{serial}/measurement

Returns the latest measurement for a single SensGate device identified by its serial number.

Authentication: None required

Response Format: JSON

Path Parameters:

Parameter Type Description
serial string The serial number of the device (e.g., F10042)

Query Parameters:

Parameter Type Default Description
pretty boolean false When true, the response JSON is indented (pretty-printed). Omitting the parameter or setting it to false returns minified JSON.

Response

  • serial (string): Device serial number
  • timestamp (string): ISO 8601 timestamp of the measurement
  • values (object): Channel readings keyed by channel name
    • Each channel contains:
      • magnitude (number): The measured value
      • unit (string): The unit of measurement

Example

{
  "serial": "F10042",
  "timestamp": "2026-03-18T16:30:22.000Z",
  "values": {
    "temperature": {
      "magnitude": 23.5,
      "unit": "°C"
    },
    "relative_humidity": {
      "magnitude": 45.2,
      "unit": "%rh"
    }
  }
}