Alarm API not filtering

Hi Milestone Developer Forum,

I am using the Alarms RestAPI 2024 R2 on cmd

"

curl --insecure --request GET “https://IP.IP.IP.IP/api/rest/v1/alarms?%%24filter=state/name%%20eq%%20%%27Video%%20Analytics%%20True%%20Positive%%27” --header "Authorization: Bearer

"

It does not filter the results, instead, it arranges the messages that match the criteria to the top of the data list. I tried many variations, but the results were the same; the filter doesn’t seem to filter

Does anyone have some tips?

I have an idea you are doing it wrong, try to see the documentation…

See “state.name” where it mentions filtering

https://doc.developer.milestonesys.com/mipvmsapi/api/alarms-rest/v1/#tag/Alarms/operation/Alarms_Get

and

https://doc.developer.milestonesys.com/mipvmsapi/api/alarms-rest/v1/#section/Filtering

I hope the tip fits.

Thank you, Bo for the information. I tested once again, and it worked:

This is the request if anyone needs it:

curl --insecure --request GET “http://IP.IP.IP.IP/api/rest/v1/alarms?state.name=equals:'Video%20analytics%20True%20Positive’” --header “Authorization: Bearer TOKEN”