TS201 – Available Services

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

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": {}
}
Time Synchronize
{
    "serviceId": "time_synchronize",
    "inputs": {}
}
Query Device Status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Clear Historical Data
{
    "serviceId": "clear_historical_data",
    "inputs": {}
}
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 Sensor ID
{
    "serviceId": "get_sensor_id",
    "inputs": {}
}
Change ACK resend times (Hardware v1.x Only)
{
    "serviceId": "lora_ack_retry_cnt",
    "inputs": {
        "cnt": 1 // Retry Cnt Type: int
    }
}
Get Device Configuration (Hardware v2.x Only)
{
                                "serviceId": "get_device_cfg",
                                "inputs": {
                                "cfg_id": "2" // Cfg ID Type: enum Enum: 2-Button Lock 3-D2D Data Transmission 4-D2D Master Control Switch 5-D2D Master Control - Temperature Threshold Trigger 6-D2D Master Control - Temperature Alarm Dismiss 7-D2D Master Control - Temperature Shift Threshold Triggered 11-Temperature Calibration 13-Temperature Threshold 14-Temperature Shift Threshold 18-Collecting Interval 19-Reporting Interval 20-Threshold Dismiss 21-Alarm Reporting Times 22-Retransmission Enable and Period 23-Historical Data Enable 24-Return Interval 25-LoRa Confirmation Packet Retransmission Count
                                }
                                }