How to best test API / Webhook Query Parameters?

Hi folks,

I’ve set up a webhook to do a GET request from openweather.org. The “Test” button in console.particle.io says successful, but doesn’t show me the return value (could be 7 days of data when I just want rainfall on one day). I can of course make the same call from a web browser, but not with the added JSON parameters (don’t know how), so I get everything.

What are some methods to test the results of a GET request built through the webhook integration section of console.particle.io, including Query Parameters that refine the result? Capturing the return JSON in firmware and doing a Particle.publish() just to troubleshoot / refine is a bit laborious…

-RC

The test button merely sends a generic event.
I have proposed a somewhat more targeted test button with the ability to enter some payload for a useful test, but never heard anything back about this.

However, providing your webhook accepts (at least temporarily) events from all your devices you can use https://console.particle.io/events


to emit an event from console
or use CLI to send events (partcle publish)

2 Likes

I’ll mess with that, thanks @ScruffR. I agree that a more targeted test button would help with the crafting of API calls / webhooks.

I may also write a simple test for the device that makes the call and prints + publishes the return values, separate from other functionality.

Follow-up: This worked great, thank you.

2 Likes