Integrate with JSON API output

I'm trying to integrate with Camlytics. It's a tool that will happily send webhooks, but I thought it would be potentially even more efficient if I could connect to its API instead? This is available to me at http://localhost:48462/v1/json/events?limit=10&order=DESC&timeout=5. I tried to access this URL from another LAN machine substituting localhost for that machine's LAN IP, but I'm guessing the firewall blocked that. An example of the output is here. The browser doesn't refresh automatically obviously but if I refresh the page the information is refreshed.

I just thought, maybe wrongly, that this would be more efficient than converting than receiving the webhook, converting to MQTT, then processing the result.
If nodered can deal with on occasion maybe three webhooks coming thick and fast then maybe I don't even need to even attempt this?

Thanks

Yes, you could do it either way round. Which is most efficient depends on what and when the exact process is... Obviously the api (using http-request node) would be great for polling results as and when you need, whereas webhooks (http-in and http-response) would be better for "pushed" results from the other end. With the former you can point at the other end as you have done - for the webhooks you need to configure the far end to point to you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.