Space callback event parameters
You can set a callback URL for a specific space. When an event occurs in that space, a notification is sent to the URL.
This document describes the data structure for space event callback parameters. It is not an API reference.
When a status is updated, a POST request with a JSON message body is sent to your server.
The user server confirms acceptance with a 200 response.
Device status event
Parameter | Type | Example value | Description |
Event | String | device_status | The event type. Value:
|
Time | Long | 1697738818 | The time when the event was sent. This is a UNIX timestamp. |
GroupId | String | 39478*****06084357 | The space ID. |
DeviceId | String | 5374667*****687846 | The device ID. |
DeviceStatus | String | on | The device status. Valid values:
|
GbId | String | 340200000013201***** | The GB ID. This parameter applies only to GB spaces. |
Stream status event
Parameter | Type | Example value | Description |
Event | String | stream_status | The event type. Value:
|
Time | Long | 1589336385 | The time when the event was sent. This is a UNIX timestamp. |
GroupId | String | 203408*****3329773 | The space ID. |
DeviceId | String | 511448*****3213176 | The device ID. |
DeviceStatus | String | on | The device status. Valid values:
|
GbId | String | 371621029913270***** | The GB ID. This parameter applies only to GB spaces. |
StreamId | String | 530386*****7373001 | The stream ID. |
StreamName | String | TestStream | The stream name. |
StreamStatus | String | on | The stream status. Valid values:
|
GB device alarm event
Parameter | Type | Example value | Description |
Event | String | device_alarm | The event type. Value:
|
Time | Long | 1697739221 | The time when the event was sent. This is a UNIX timestamp. |
GroupId | String | 311351*****5774159 | The space ID. |
DeviceId | String | 311379*****7326085 | The device ID. |
DeviceStatus | String | on | The device status. Valid values:
|
GbId | String | 440300009921700***** | The GB ID. This parameter applies only to GB spaces. |
Alarm | String | 5 | The alarm type. Valid values:
|
SubAlarm | Int | 1 | The alarm subtype. Valid values:
|
Priority | String | 1 | The alert level. Valid values:
|
StartTime | Int | 1697739220000 | The time of the alarm. This is a UNIX timestamp in milliseconds. |
Request example
POST http://<callback_hostname>/<callback_path>{
"Event":"device_status",
"DeviceId":"5374667*****687846",
"DeviceStatus":"on",
"Time":1470040811,
"GBId":"340200000013201*****",
"GroupId":"3947806*****084357"
}