CTH01 – Available Services
This topic provides IDs of services that can be invoked on CTH01.
Usage
- Workflow
-
- Copy the snippet of the desired service.
- If input parameters are required, fill in the values and remove the comments.
- 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": {} }
- Stop retrieving historical data
-
{ "serviceId": "stop_historical_data_retrieval", "inputs": { "type": "0" // Stop Retrieval Type: enum Enum: 0-alarm data 1-period data 2-month energy data 3-month min_max data } }
- Retrieve historical data for a specific time
-
{ "serviceId": "retrieve_historical_data_by_time", "inputs": { "type": "0", // Type Type: enum Enum: 0-alarm data 1-period data 2-month energy data 3-month min_max data "time": "date" // Time Point Type: date } }
- Retrieve historical data for a specific time range
-
{ "serviceId": "retrieve_historical_data_by_time_range", "inputs": { "type": "0", // Type Type: enum Enum: 0-alarm data 1-period data 2-month energy data 3-month min_max data "start_time": "date", // Start Time Type: date "end_time": "date" // End Time Type: date } }
- Query Device Status
-
{ "serviceId": "query_device_status", "inputs": {} }
- Time Synchronize
-
{ "serviceId": "synchronize_time", "inputs": {} }
- Rejoin the Network
-
{ "serviceId": "reconnect", "inputs": {} }
- Clear Cumulative Energy Consumption
-
{ "serviceId": "reset_energy", "inputs": { "channel": 0 // Channel Number Type: int } }
- Clear Historical Data
-
{ "serviceId": "clear_data", "inputs": { "type": "0" // Data Type to Clear Type: enum Enum: 0-alarm data 1-period data 2-month energy data 3-month min_max data } }
- Query Data Storage Configuration
-
{ "serviceId": "query_history_set", "inputs": {} }
- Query Threshold Configuration
-
{ "serviceId": "query_alarm_set", "inputs": { "type": "0" // Threshold Type Type: enum Enum: 0-temperature alarm 1-current alarm 2-voltage alarm 3-thdi alarm 4-thdv alarm 5-voltage unbalance alarm } }