Emdx analytics webapi not working correctly

I have ainvr v02 deployed on a jetson Orin NX, my problem is that the emdx analytics webapi is not behaving correctly, it keeps trying to get data for ROIs and Tripwires that have long been deleted.

Here are the webapi logs that i’m getting:
webapi.log (128.0 KB)
as for the frames endpoint, i just get the message:
{“error”:“metadata not present for SENSOR”}
My config is the default config

Also, in the fov occupancy count endpoint, when i try to get the count for a list of objects, if the all the objects are detected in the stream, the count of each object is returned seperatly, if one of the objects i send isn’t detected, the returned object contains only the count for “*”, it doesn’t give the count for the other objects that are detected.
I tried the endpoint with the following url :
strong text

And here’s the return object:

{
  "fovOccupancy": [
    {
      "averageCount": 23.68,
      "sumCount": 5,
      "type": "*"
    }
  ]
}

Also, i noticed that when i try to get the count of roi or tripwire or fov, it’s 2 minutes before the UTC time, it’s always this way, but in V1 i didn’t face this problem

Can you share the command line when you meet the issue? We can support V1 and V2 currently. Is it fine if you use V1 API for JPS 2.0? Or you need use V2 API?

i’ve downgraded to V1, but i still have some problems with the count, i can’t access it instantly, maybe the way i’m trying to get the count is wrong, i’m trying to get it each time from the /roi/count endpoint, can you explain what this endpoint retrieves exactly, because i’m providing the fromTimestamp and toTimestamp params, which doesn’t make sense if i want to get the number of objects in an roi at a certain time. Also, in VST i can see that the count is retrieved in real time, can you provide the way they’re getting this count?
Thanks in advance

Here is the API for emdx: API Specification — Jetson Platform Services documentation. Which API are you using? Can you share the command line?

i’m using the legacy api, /api/metrics/occupancy/roi/count with fromTimestamp and toTimestamp, but if i pass 1 sec difference for example, it gets me a very small number (count), even though at that timerange the roi is full, so this i couldn’t understand, it’s the same for the fov too.

Can you help to check if you get enough object in below files?

/data/emdx-volume/$SENSOR_NAME/metadata/$YY-MM-dd

Replace $SENSOR_ID variable with the name of the sensor from your query.
Repace $YYYY-MM-hh variable withe the values from your query.

yes, i think i’m getting enough objects there:

Can you run below command line to get the object count of every second?

curl "http://10.19.225.134:30080/emdx/api/v2/metrics/occupancy/fov/histogram?sensorId=11&fromTimestamp=2025-01-20T06:41:31.610Z&toTimestamp=2025-01-20T06:42:02.641Z&bucketSizeInSec=1"

i tried this endpoint, the count seems reasonable, it gives 19 using fov histogram, which is reasonable in my case, unlike the /fov/count endpoint which gives low values. what is the difference between the two endpoints?

Can you have a try with below command line for fov count? Please use the latest emdx in ai_nvr package: Jetson Platform Services Reference Workflow & Resources | NVIDIA NGC

curl "http://10.19.225.134:30080/emdx/api/v2/metrics/occupancy/fov?sensorId=11&fromTimestamp=2025-01-20T06:41:31.610Z&toTimestamp=2025-01-20T06:42:02.641Z"

i already tried emdx v2, but as i had issues with it i downgraded to v1 which seems more stable, this endpoint does work well on v1 as i pointed before