Help with VMS 6.1 REST Analytics Integration: Service Requirements and Deletion Issues
NewFor creating and managing the integration, I've used these endpoints:
- Create integration: POST
/rest/v4/analytics/integrations/*/requests
- Approve integration: POST
/rest/v4/analytics/integrations/*/requests/{requestId}/approve
- Tried to delete: DELETE
/rest/v4/analytics/integrations/*/requests/{requestId}
(but got error that approved integrations can't be deleted)
After setting up, I'm getting two main issues:
- When trying to push metadata I get:
{
"error":"6",
"errorId":"internalServerError",
"errorString":"Integration Request data was not found, User id: {99cbc715-539b-4bfe-856f-799b45b69b1e}."
}
- After restarting the server and trying to activate the integration, I get:
"1 suitable integration service is required to turn on integration"
Here's my integration configuration:
{
"deviceAgentManifest": {
"capabilities": "noCapabilities",
"deviceAgentSettingsModel": {
"setting1": "value1"
},
"supportedTypes": [
{
"attributes": [
"age"
],
"eventTypeId": "event1",
"objectTypeId": "human"
}
],
"typeLibrary": {}
},
"engineManifest": {
"capabilities": "noCapabilities",
"deviceAgentSettingsModel": {
"setting1": "value1"
},
"objectActions": [
{
"id": "NVR-analytics",
"name": "NVR Analytics",
"parametersModel": {
"enabled": {
"default": true,
"type": "Boolean"
},
"threshold": {
"default": 0.5,
"max": 1,
"min": 0,
"type": "Number"
}
},
"requirements": {
"bestShotVideoFramePixelFormat": "undefined",
"capabilities": "noCapabilities"
},
"supportedObjectTypeIds": [
"human"
]
}
],
"preferredStream": "primary",
"streamTypeFilter": "compressedVideo",
"typeLibrary": {
"objectTypes": [
{
"attributes": [
{
"name": "age",
"type": "Number"
}
],
"flags": "",
"id": "human",
"name": "Person"
}
]
}
}
}
And this is the metadata I'm trying to push:
{
"durationUs": 0,
"flags": "none",
"objects": [
{
"attributes": [
{
"confidence": 0.8,
"name": "age",
"type": "Number",
"value": "30.000000"
}
],
"boundingBox": {
"height": 0.3,
"width": 0.2,
"x": 0.1,
"y": 0.1
},
"confidence": 0.95,
"subtype": "person",
"trackId": "7dc1ac86-5afb-54b1-2a13-a12cd45a2851",
"typeId": "human"
}
],
"timestampUs": 1736860635415763
}
The process I followed was:
- Created the integration (REST-only) using the create endpoint
- Got it approved using the approve endpoint
- Tried to push metadata (got first error)
- Restarted server
- Tried to activate integration (got second error)
Additionally, I can't delete the integration as it's already approved. Is there a way to unapprove or force delete an approved integration?
The metadata format seems correct as it matches the integration configuration. Could you help me understand:
- What might be causing these errors?
- What additional services might be needed?
- How to properly delete an approved integration?
Thank you in advance for any help!
-
Hello!
First of all, thank you for trying out our beta functionality and sharing your feedback!
To address your questions:
-
Deleting an Integration Request
The "Delete Integration Request" option is for scenarios where you don’t want to approve an integration and would like to remove the request from the Integrations window. Once an integration is approved, there is no longer a request to delete.
If your intention is to remove an already approved integration, you can do so by using the following endpoint:DELETE /rest/v4/analytics/integrations/{id}
-
Services error
I see that you’ve provided the engine manifest and device agent manifest. However, could you, please, show the integration manifest? We recently introduced support for integrations that rely on SaaS services, and this error appears when an integration requests a service it needs to operate.
Let me know if this helps or if you need further clarification!
-
-
Thank you for the clarification about integration deletion.
I want to better explain our goal: We are trying to implement something similar to the
api/createEvent
endpoint but with additional visualization capabilities. Specifically:- We want to send events that include bounding boxes to visualize them over the video
- For this, we are trying to use the endpoint
/rest/v4/analytics/engines/{id}/deviceAgents/{deviceId}/metadata/object
Our main question is about the correct sequence of steps to achieve this. What would be the complete flow from integration creation to being able to send events with bounding boxes that are visualized over a specific device?
Currently, we have:
- Created the integration (REST-only)
- Approved the integration
- Tried to activate it on a device
But we encounter the integration service error. Could you provide us with the correct sequence of steps and endpoints needed to achieve this goal?
Thank you in advance.
-
The correct way to create a REST-only integration is:
- Send a request for approval, providing an Integration and an Engine manifests. If the Integration is planned to be REST-only, the Integration manifest must have isRestOnly flag set to true, also, Device Agent manifest must be provided along with two others.
- Approve the Integration. In general scenario, the administrator of the system will need to approve it in the UI with pin-code, provided by Integration.
- Integration must understand that it was approved before operating. For REST-only Integration this might be done by polling GET /rest/v4/users/{username}, for the Integration's user. There's a parameters section, if approved, this section will contain "isApproved" flag equal to true, also, integration ID can be found there for convenience.
- After that, Integration can authorize with this user, get engine id at GET /rest/v4/analytics/engines?integrationId=<your_integration_id> and poll for device agents at GET /rest/v4/analytics/engines/{engine_id}/deviceAgents
- When user activate integration in the device settings, there would be deviceAgents in the response from #4
- After that you can get stream for the device, analyze it and send metadata for this device.
The error about services you get may occur if you included "isLicenseRequired" in the Integration manifest, telling the server that it must obtain service license from the Cloud.
Hope that helps!
Please sign in to leave a comment.
Comments
4 comments