UC50x – Available Services

This topic provides IDs of services that can be invoked on UC50x.

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

Reboot
{
    "serviceId": "reboot",
    "inputs": {}
}
Query Device Status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Clear Data
{
    "serviceId": "clear_historical_data",
    "inputs": {}
}
Retrieve Historical Data for a Specific Time
{
    "serviceId": "retrieve_historical_data_by_time",
    "inputs": {
        "time": "date" // Time Point Type: date
    }
}
Retrieve Historical Data for a Specific Time Range
{
    "serviceId": "retrieve_historical_data_by_time_range",
    "inputs": {
        "start_time": "date", // Start Time Type: date
        "end_time": "date" // End Time Type: date
    }
}
Stop Retrieving Historical Data
{
    "serviceId": "stop_historical_data_retrival",
    "inputs": {}
}
GPIO1-DO1 Mode
{
    "serviceId": "set_digital_output_1_mode",
    "inputs": {
        "level_status": "0" // GPIO1-DO1 Status Type: enum Enum: 0-Low 1-High
    }
}
GPIO2-DO2 Mode
{
    "serviceId": "set_digital_output_2_mode",
    "inputs": {
        "level_status": "0" // GPIO2-DO2 Status Type: enum Enum: 0-Low 1-High
    }
}