Camera Event Rules -> HTTP(S) Request and Content
AnsweredHi,
I encounter some problems while using Camera Event Rules with HTTP(S) Request.
We are an integrator and the objective is to retreive events from Nx Witness server, and integrate them into our telesurveil system.
So we have added an Http request onto Analytics Object Detected (for example), we have set the url of a webservice whitch will receive the events with POST method.
And we need to set interesting datas in the content of this request.
My first problem was that entering Nx HTTP Request ”variables" in the content like {event.cameraId} and so on are not working with 6.0.xxx version of my Nx Witness server, but after upgrading to Beta 6.1 it works… do you know if I'm missing something or Http Request are only available onto Beta 6.1 version ?
I need few informations in the content but is there some list of available "variables" ?
I've retreive a large part of my needs but I need also datas like :
- Server IP Adress if it's not defined as cloud device
- Server Port if it's not defined as cloud device
- Server Cloud System ID only if it's a cloud device
Do you know if these data are available or if you plan to include them into http request “variables” ?
Kind regards,
Thierry
NB : my content is actually this one for a cloud device
{
"siteId":"CLOUD_SYSTEM_ID_HARD_CODED",
"serverName":"{server.name}",
"siteName":"{site.name}",
"device":"{device.logicalId}",
"source":"{event.source}",
"caption":"{event.caption}",
"cameraId":"{event.cameraId}",
"cameraName":"{event.cameraName}",
"eventType":"{event.eventType}",
"eventName":"{event.eventName}",
"timestamp":"{event.time}",
"description":"{event.description}"
}And this one for an IP + Port device
{
"siteId":"172.21.100.32:7001",
"serverName":"{server.name}",
"siteName":"{site.name}",
"device":"{device.logicalId}",
"source":"{event.source}",
"caption":"{event.caption}",
"cameraId":"{event.cameraId}",
"cameraName":"{event.cameraName}",
"eventType":"{event.eventType}",
"eventName":"{event.eventName}",
"timestamp":"{event.time}",
"description":"{event.description}"
}-
Hi Thierry CHAILLAN,
Before version 6.1, the number of placeholders was limited. Starting with 6.1, the range of supported placeholders has been expanded.
That said, not all of the placeholders from your examples are currently supported in the current release (6.0.6) or will be supported in the upcoming release (6.1.0).
You can find the list of supported placeholders for the current release here: LINK. For version 6.1, please refer to the in-client manual of the Beta release.
With kind regards.
0 -
Hi Norman,
thanks for your answer, this is clear but have you got any way to retreive cloud system Id of the vms, or anything whitch allow us to do the link beetween an http request and a specific Nx Server ?
Perhaps something in the headers of the http request or anywere else ?
Actually we can hard code the cloud system Id of the server in the json content, but we have to give a custom content to each of our customers.
For us it could be very useful to have this information directly in the json content of the Http Request.
Another question, when will the version 6.1 be officialy released?
Is there any list of different values we can found in {event type} or {event.caption} to build a list of alarm codes that your devices can return ?
0 -
Hi Thierry CHAILLAN,
Yes, absolutely! By sending a
GET /rest/v3/system/inforequest, you can access a wealth of system data, including the Cloud ID, and then parse that information (and much more) into a detailed description. That said, it does require some additional development work.For more advanced integrations, I - not being a developer - usually prefer using Node-RED since it makes it easier for me to combine multiple tasks into a single, streamlined flow.
I don’t have a confirmed release date for version 6.1 yet, but I expect it should be available soon.You’ll find the list of values included in the version 6.1 manual.
0 -
Hi Norman ,
We are already using
GET /rest/v3/system/infoto retreive cloud Id in our intégration.But in fact, if we listen a HTTP request onto a specific port for multiple NxVMS, we have actually no way to find whitch NxVMS is the issuer of the http request, except while using {site.name} and comparing to all systemName retreived from
GET /rest/v3/system/info.As system name can be customized by NxVMS user, and it can be better for us to find some fixed datas like cloud ID, in available metadatas (or headers) sent with the Http Request.
In the manual I've found this list :

But in the metadatas, this is not exactly same lable, for example onto an analytics person detected event we receive :
- "caption":"Person"
- "eventType":"analyticsObject"
- "eventName":"Person"
and “Analytics Object Detected”, so is there any list of available eventType and caption ?
kind regards
0 -
Hi Thierry CHAILLAN,
I'm sure if I understand the problem entirely.
You can have a ton of systems, but each one will have a unique ID.
If you're afraid, someone changes the name, you could make a API request to check the name, and change it back if it was changed.Also, you can filter per connected Server if you like.
Regarding:
so is there any list of available eventType and caption
Unfortunately, there is no such list, since they vary per Vendor, and sometimes even per model or per firmware. However, you can retrieve such list per device with a
GET /rest/v3/devices/{id}request.
0
Please sign in to leave a comment.
Comments
5 comments