Implementing webhooks with CrowdSense empowers your applications to receive immediate updates when specified events occur. This feature is crucial for maintaining up-to-date information and automating reactions to crowd-related triggers. Ideal for systems requiring immediate data synchronization or event-driven actions, our webhooks provide a direct line to the most current event analytics, optimizing your operational response times and engagement strategies.
Webhooks are the preferred way to receive events in real-time without making any excessive requests. In order to do that, you would need a webhook receiving endpoint.
For testing purposes, you can use requestbin.com service.
In order to access the webhooks settings, in cloud portal, go to Settings > Webhooks. There, you would set up the endpoint for each of the added channels or for the whole location. If you set the webhook for the whole location you would receive all events for any of the location channels.
The JSON structure of the webhook event is very similar to the API structure. The default webhook timeout is 10 seconds. The time of the event is in UTC time zone.
[ { "record_id" : 1635343534, "event_type" : "RegionJoin", "snapshot_id" : -235343534, "trigger_id" : "47576ahb-56656-45786-acb45_000015E2", "origin" : "Pedestrian", "suborigin" : "Unknown", "age_range" : "", "gender" : "", "id" : null, "channel_id" : "35576ahb-56656-45781-acb45_000015E2", "object_id" : 6, "location_id" : 123, "event_time" : "2000-01-23 04:56:07.000" }, { "record_id" : 1635343534, "event_type" : "RegionJoin", "snapshot_id" : -235343534, "trigger_id" : "47576ahb-56656-45786-acb45_000015E2", "origin" : "Vehicle", "suborigin" : "Car", "age_range" : "", "gender" : "", "id" : null, "channel_id" : "35576ahb-56656-45781-acb45_000015E2", "object_id" : 6, "location_id" : 123, "event_time" : "2000-01-23 04:56:07.000" }, { "record_id" : 1635343534, "event_type" : "RegionJoin", "snapshot_id" : -235343534, "trigger_id" : "47576ahb-56656-45786-acb45_000015E2", "origin" : "Face", "suborigin" : "", "age_range" : "26 - 35", "gender" : "Male", "id" : null, "channel_id" : "35576ahb-56656-45781-acb45_000015E2", "object_id" : 6, "location_id" : 123, "event_time" : "2000-01-23 04:56:07.000" } ]
The REST API for CrowdSense enables seamless integration with your existing systems, allowing for real-time data exchange and enhanced functionality. This API is designed to be flexible and easy to use, supporting a wide range of operations from data retrieval to event management tasks.