Using Create Event and Bookmark event and also get the recording.
In ProgressI have used the CreateEvent API but in this i have used the
1.Link for CreateEvent- https://192.168.1.133:7001/api/createEvent?source=accessgranted&caption=Accessheld&metadata={"cameraRefs":["3c7d7025-1d78-7596-1afd-8700f38d475a"]}
but i want to use CreateEvent API with the use of body there i m getting error like this ErrorCode-622
{
"error": "3",
"errorId": "cantProcessRequest",
"errorString": "At least one of values 'source', 'caption' or 'description' should be filled"
}
Can you tell me for this where i m mistaken.As I want to use with body this API.
And while creating these Events through API, it is correctly getting reflected to the NX window but without any recording.
Image attached below for reference
2.I have used the CreateBookmark API in that i m getting the bookmarks in the right side tab but not on the Bookmark tab attached the image below.And also the image getting captured here as image and not video.
3.For running the above API's We have to use the current token ,so that other API's work??? Is their something else which we can use!!
-
Hello Tanaya,
1. Error from server
In the first example you are using GET request and trying to attach the http body.
Most likely what's happening is the HTTP client you are using in this case will strip the http body and will send GET request to the specified url. And since there is no "caption", "description" or "source" parameters in it, server's response is pretty legit.Possible resolution options - use POST requests if you want to pass parameters in the body OR add the query params to the URL if you have the hard requirement to stick to GET method.
2. Missing images
Recording is not enabled at your cameras(license is not spent). Without it server keeps the previews for some time but then drops, which is why you see "No Data". If you want the previews be available, recording must exist, i.e. it camera should be activated with the license, recording should be generated either by the "Recording schedule" or with the "Recording on Camera" action in the Event Rules.
3. Authorization
Using the bearer token is the recommended authorization method since VMS 5.0.
That said, the deprecated(insecure) digest and basic authentication methods could still be used but are disabled by default.
Please follow this manual page to enable and test against them:
https://resources.vmsproxy.com/nx_6.0_help/session-and-digest-authentication.htmlPlease note that the support for the deprecated methods might be stopped at some point. So again - our recommendation is to build integrations using the recommended approach to ensure end users experience.
-
Thanks Sergey Yuldashev it was much helpful,
I added the license and got the recordings.
also now I want to create EventRules so that I get bookmarks and it should be visible at Bookmarks log also.
But while running that API i m getting error.Image atttached below.Do let me know.
Please sign in to leave a comment.
Comments
2 comments