HALO Smart Sensor Integration
AnsweredHello,
In v5 we added support for Bearer Token and successfully used :
https://SERVERIPADDRESS:7001/rest/v2/login/sessions[HEADER]Content-Type:application/json[TOKENEXPR]expiry_key:expiresInS
as the AUTH URL and used :
POST:http://SERVERIPADDRESS:7001/api/createEvent?caption=%NAME%&description=%EID%&source=%NAME%
To send Generic Events to NXW
This is no longer working in V6. The authentication is still working and the token is accepted, but when we send the POST, we get a FORBIDDEN response.
The only way we can get Generic Events to work is to Allow Digest Authentication for an Admin User account to login and then we send : http://SERVERIPADDRESS:7001/api/createEvent?caption=%NAME%&description=%EID%&source=%NAME% on HALO Events with the Advanced Setting of Insecure Deprecated Api Enabled checked in the Web Admin. This is what the current API suggested.
Is there a better, more secure way to trigger Generic Events via HTTP from a third party device?
-
Hi Jack Plunkett,
For 6.0, we use v3 of our REST API, and the following URL can be used:
https://SERVERIPADDRESS:7001/rest/v3/login/sessions[HEADER]Content-Type:application/json[TOKENEXPR]expiry_key:expiresInSFor the Generic Event, if you add all parameters into the URL you use the GET method.
GET: http://SERVERIPADDRESS:7001/api/createEvent?caption=%NAME%&description=%EID%&source=%NAME%If you want to use POST, parameters should be passed as a JSON object in the POST message body with content type "application/json". Example:
{ "source": "", "caption": "", "description": "" }For example with CURL:
curl --insecure -X 'POST' 'https://localhost:7001/api/createEvent' -H 'accept: application/json' -H 'Content-Type: application/json' -H 'x-runtime-guid: vms-e180946ef2397fbe5d00397be4783464-aEhDP5FDhz' -d '{"source":"","caption": "","description": ""}For Generic Events, you can use a Bearer token, just as for any other API request. For the user level, it has to be Advanced Viewer or better. No need to use the admin account.
0
Please sign in to leave a comment.
Comments
1 comment