WS52x – Available Services

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

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: milesight.demo.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Inxxxxxxxxxxxxxx
Content-Type: application/x-www-form-urlencoded
User-Agent: OpenAPI

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

Available services

Service parameters

Reboot the device
{
    "serviceId": "reboot",
    "inputs": {}
}
Query device status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Query device attribute
{
    "serviceId": "query_device_attribute",
    "inputs": {}
}
Clear power consumption
{
    "serviceId": "power_consumption_clear",
    "inputs": {}
}
Create delay task
{
    "serviceId": "set_delay_work",
    "inputs": {
        "delay_time": 1200,   // Specify the delay time. (Unit: Second).
        "ctrl_status1": 1     // Socket on.
    }
}
Delete delay task
{
    "serviceId": "del_delay_work",
    "inputs": {}
}