Skip to content

Base Data

Base data endpoints provide system configuration options and device type information.

Get Factor Options

Retrieve available configuration options for factor setup.

http
GET /api/v2/base/factor-options/

Response

json
{
    "success": true,
    "data": {
        "data_type_choices": [
            ["INT16", "16-bit Integer"],
            ["UINT16", "16-bit Unsigned Integer"],
            ["INT32", "32-bit Integer"],
            ["UINT32", "32-bit Unsigned Integer"],
            ["FLOAT", "Single Precision Float"]
        ],
        "modbus_type_choices": [
            ["INPUT_REGISTER", "Input Register"],
            ["HOLDING_REGISTER", "Holding Register"],
            ["DISCRETE_INPUT", "Discrete Input"],
            ["COIL", "Coil"]
        ],
        "data_endian_choices": [
            ["ABCD", "Big Endian (ABCD)"],
            ["DCBA", "Little Endian (DCBA)"],
            ["BADC", "Big Endian Byte Swap (BADC)"],
            ["CDAB", "Little Endian Byte Swap (CDAB)"]
        ]
    },
    "error": null
}

Field Descriptions

  • data_type_choices: Data type options

    • INT16: 16-bit signed integer
    • UINT16: 16-bit unsigned integer
    • INT32: 32-bit signed integer
    • UINT32: 32-bit unsigned integer
    • FLOAT: Single precision floating point
  • modbus_type_choices: Modbus data type options

    • INPUT_REGISTER: Input register (read-only)
    • HOLDING_REGISTER: Holding register (read-write)
    • DISCRETE_INPUT: Discrete input (read-only boolean)
    • COIL: Coil (read-write boolean)
  • data_endian_choices: Byte order options

    • ABCD: Big endian (high byte first)
    • DCBA: Little endian (low byte first)
    • BADC: Big endian byte swap
    • CDAB: Little endian byte swap

Get Device Types

Retrieve the list of supported device type configurations.

http
GET /api/v2/base/device-types/

Response

json
{
    "success": true,
    "data": [
        {
            "type": "temp",
            "name": "Temperature",
            "unit": "℃",
            "icon": "https://ums.holdingbyte.com/media/icon/temp.png"
        },
        {
            "type": "humi",
            "name": "Humidity",
            "unit": "%RH",
            "icon": "https://ums.holdingbyte.com/media/icon/humi.png"
        }
    ],
    "error": null
}

Field Descriptions

  • type: Device type identifier
  • name: Device type display name
  • unit: Data unit
  • icon: Device type icon URL