Hello !
Despite closely following the API documentation, I keep receiving Bad Request errors when trying to trigger alarms and analytics events through the REST API.
I have tested with both Express 2023 R3 and Express 2024 R1. Could the error come from the Express version ?
Authentication and token configuration has correctly been done as I can, for example, request the list of cameras.
Here’s a recap of my requests:
POST /alarms
```
{
“name”: “Test alarm”, # Alarm name retrieved from the GET /alarms. This alarm indeed exists
“message”: “this is a test”,
“source”: “cameras/<CAMERA_GUID>”
}
```
POST /analyticsEvents
```
{
“type”: “<ANALYTICS_EVENT_GUID>”, # id field from the GET /analyticsEvents. Not sure if this corresponds to a ‘type’ though
“source”: “cameras/<CAMERA_GUID>”,
“datatype”: “analytics”
}
```
- Is there an issue with these payloads ?
- Why does the /alarms endpoint expects a name rather than an alarm guid ?
- Is there any way to trigger an alarm without linking it to an Alarm Definition ? As it is possible with the Soap integration
Many thanks for your help