We’re developing a small integration with Milestone version 2025 r3.
We’re using API Gateway version 25.3.17737.1.
We’re having a problem with Event GETs:
For example, if I run
{{baseUrl}}/events?source.id=equals:‘cameras/7ae397c6-159b-4284-bd16-c5ca6ce31c4f’, I get the camera’s event list correctly.
But if I run get {{baseUrl}}/events?source.id=equals:‘cameras/7ae397c6-159b-4284-bd16-c5ca6ce31c4f’&type=equals:‘dd3e6464-7dc0-405a-a92f-6150587563e8’, it returns an empty list.
Even trying other parameters doesn’t work, the filter doesn’t work.
Has anyone solved this problem? Are we doing something wrong?
Thanks
I did a quick test (using Postman). For me it works.
GET /api/rest/v1/events?type=equals:‘58f68dec-ae25-43e0-9506-1760d8d528b5’&source.id=equals:‘1852a7a0-e9d4-4e0b-947b-697e63c776cb’
GET /api/rest/v1/events?source.id=equals:‘1852a7a0-e9d4-4e0b-947b-697e63c776cb’&type=equals:‘58f68dec-ae25-43e0-9506-1760d8d528b5’
both works.
I did it stepwise, had one event first found without any filter then saw that both these worked before combining.
GET /api/rest/v1/events?type=equals:‘58f68dec-ae25-43e0-9506-1760d8d528b5’
GET /api/rest/v1/events?source.id=equals:‘1852a7a0-e9d4-4e0b-947b-697e63c776cb’
I am a bit in the dark why it fails in your end. I must admit my first idea is if you could doublecheck you tests..
Thanks,
I followed your advice,
and I can do GET on events even with the type & sensor.id filter.
But this filter still doesn’t work, I try to explain:
- I ran the GET on events with sensor.id
/api/rest/V1/events?source.id=equals:‘cameras/7ae397c6-159b-4284-bd16-c5ca6ce31c4f’
Among the events for this sensor, there are also events with ‘type’: ‘dd3e6464-7dc0-405a-a92f-6150587563e8’
e.g.:
{‘specversion’: ‘1.0’, ‘type’: ‘dd3e6464-7dc0-405a-a92f-6150587563e8’, ‘source’: ‘cameras/7ae397c6-159b-4284-bd16-c5ca6ce31c4f’, ‘time’: ‘2025-12-02T16:04:03.4727728Z’, ‘id’: ‘559346d2-b5f9-42ab-b745-c3e2e50b2ed9’, ‘localId’: 151490, ‘datatype’: ‘none’}
- Then I ran the GET on the events with type
/api/rest/V1/events?type=equals:‘dd3e6464-7dc0-405a-a92f-6150587563e8’
It doesn’t return any data; the list is empty.
We can’t figure out if and where we’re going wrong.
‘dd3e6464-7dc0-405a-a92f-6150587563e8’ - is a valid type. I find it in the documentation described as “CommunicationStarted”, ref.: https://doc.developer.milestonesys.com/mipsdk/index.html?base=sdkhelp/class_video_o_s_1_1_platform_1_1_s_d_k_1_1_status_client_1_1_known_status_events.html&tree=tree_search.html?search=dd3e6464-7dc0-405a-a92f-6150587563e8
I believe I have reproduced your observation in the Milestone test labs. I will make an report with Milestone Development to get an explanation and possibly a workaround or fix.
The CommunicationStarted event is not saved in the database.
If opening the configuration by going to Management Client - Tools - Option - Alarms and events tab and in the Event retention control expand Device Events, you will find ‘Communication Stopped’ but not ‘Communication Started’. That you then get it on the broader query where you do not filter for type is actually a fluke.
The explanation came from Milestone Development and they have made a fix for future versions. In XProtect 2026R1 and going forward this event will be saved.