Alarm Management API
Get Emergency Alarm List
Request URL
POST /api/v1.0/invoke/open-ability/method/manager-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| project_id | String | Body | Yes | Project ID |
| page_size | Integer | Body | Yes | Page size |
| page_index | Integer | Body | Yes | Page index |
| start_time | String | Body | Yes | Start time, UTC |
| finish_time | String | Body | Yes | Finish time, UTC |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| alarm_time | String | Body | Alarm time, UTC |
| alarm_type | String | Body | Alarm type |
| building_id | String | Body | Building ID |
| building_name | String | Body | Building name |
| device_id | String | Body | Device ID |
| device_name | String | Body | Device name |
| mac | String | Body | MAC |
Request Example
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_emergency_alarm_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"start_time": "2024-01-16 13:32:45",
"finish_time": "2024-01-17 13:32:45",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"alarm_time": "2024-01-16 15:10:43",
"alarm_type": "Smoke Sensor alarm",
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01"
}
]
}
Failure Return Example
Get Arming Alarm List
Request URL
POST /api/v1.0/invoke/open-ability/method/manager-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| project_id | String | Body | Yes | Project ID |
| page_size | Integer | Body | Yes | Page size |
| page_index | Integer | Body | Yes | Page index |
| start_time | String | Body | Yes | Start time, UTC |
| finish_time | String | Body | Yes | Finish time, UTC |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| alarm_time | String | Body | Alarm time, UTC |
| alarm_type | String | Body | Alarm type |
| residence_id | String | Body | Residence ID |
| family_name | String | Body | Family name |
| residence_no | String | Body | Residence Number |
| building_id | String | Body | Building ID |
| building_name | String | Body | Building name |
| device_id | String | Body | Device ID |
| device_name | String | Body | Device name |
| mac | String | Body | MAC |
Request Example
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_arming_alarm_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"start_time": "2024-01-16 13:32:45",
"finish_time": "2024-01-17 13:32:45",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"alarm_time": "2024-01-16 15:10:43",
"alarm_type": "CO Sensor alarm",
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"family_name": "test",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01"
}
]
}