UC100v2 – Available Services

This topic provides IDs of services that can be invoked on UC100 (hardware v2.x).

Usage

Workflow
  1. Copy the snippet of the desired service.
  2. If input parameters are required, fill in the values and remove the comments.
  3. Use it as the body parameters of Invoke Device Services Asynchronously .
Example
POST /device/openapi/v1/devices/1737019327786467329/services/call HTTP/1.1
Host: demo.milesight.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Inxxxxxxxxxxxxxx
Content-Type: application/json

{
    "serviceId": "reboot",
    "inputs": {}
}

Supported services

Service ID

Retrieve historical data for a specific time
{
    "serviceId": "retrival_historical_data_by_time",
    "inputs": {
        "time": "date" // Time Point Type: date Unit: s
    }
}
Retrieve historical data for a specific time range
{
    "serviceId": "retrival_historical_data_by_time_range",
    "inputs": {
        "start_time": "date", // Start Time Type: date Unit: s
        "end_time": "date" // End Time Type: date Unit: s
    }
}
Stop retrieving historical data
{
    "serviceId": "stop_historical_data_retrival",
    "inputs": {}
}
Get RS485/Modbus Parameters
{
    "serviceId": "get_rs485_modbus_param",
    "inputs": {
        "type": "0" // type Type: enum Enum: 0-RS485 1-Modbus
    }
}
Query Device Status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Time Synchronize
{
    "serviceId": "synchronize_time",
    "inputs": {}
}
Reboot
{
    "serviceId": "reboot",
    "inputs": {}
}
Clear Historical Data
{
    "serviceId": "clear_historical_data",
    "inputs": {}
}
Rule Enable Setting
{
    "serviceId": "rule_enable_setting",
    "inputs": {
        "id_1": false, // Rule1 Type: bool
        "id_2": false, // Rule2 Type: bool
        "id_3": false, // Rule3 Type: bool
        "id_4": false, // Rule4 Type: bool
        "id_5": false, // Rule5 Type: bool
        "id_6": false, // Rule6 Type: bool
        "id_7": false, // Rule7 Type: bool
        "id_8": false, // Rule8 Type: bool
        "id_9": false, // Rule9 Type: bool
        "id_10": false, // Rule10 Type: bool
        "id_11": false, // Rule11 Type: bool
        "id_12": false, // Rule12 Type: bool
        "id_13": false, // Rule13 Type: bool
        "id_14": false, // Rule14 Type: bool
        "id_15": false, // Rule15 Type: bool
        "id_16": false, // Rule16 Type: bool
        "enble": "1" // Rule Setting Type: enum Enum: 1-enable 2-disable 3-delete
    }
}
Get Rule Engine Settings
{
    "serviceId": "get_rule_settings",
    "inputs": {
        "rule_id": 1 // Rule ID Type: int
    }
}