Application Integration

How to configure polling frequency

We had several questions about polling frequency configuration with Streamdata.io, so I thought it was worth writing a blog post to share the different options you have. If you are completely new to Streamdata.io, I invite you to read our How it works page as it is a good starting point to understand the general concepts. If you are not a streamer yet, you can easily register for a free account here.

At the time I am writing this blog post, polling frequency is only configurable via our Web Portal. Note that we already planned to enable polling frequency configuration via API in the near future. But for now, let’s focus on the two different options you can find in Streamdata.io portal:

 

Option 1: Default Polling Frequency

You can define a default polling frequency for each of your applications. This configuration will only apply to newly created APIs within the selected application. In case your application already contains APIs, their polling frequency will remain unchanged.

To configure the default polling frequency for an app, follow these steps :

– Login to Streamdata.io Portal.
– Select an application.
– Select Settings on the right side menu, then select Polling Frequency sub-entry.
– You can now set the default polling frequency that will be applied to all newly created APIs. Do not forget to Save!

Default Polling Frequency Configuration

Option 2: Specific Polling Frequency

In addition to the default polling frequency, you can override the polling frequency for each API. This can be done by simply editing the API. Note APIs are automatically provisioned in the portal the first time you call the target URL through our proxy.

You can do it by simply running a cURL command matching the following pattern:

curl -v "https://streamdata.motwin.net/[http://targetURL]?X-Sd-Token=[YOUR_APP_TOKEN]"

Make sure to replace the [YOUR_APP_TOKEN] by the application token of your app. It can be found in Settings > Security. You can also use our client SDK or demos to stick to your preferred environment (JavaScript, iOS, Android, Pebble, and more). All projects are open-source on Streamdata.io GitHub.

Once you have provisioned your API:

– Navigate to My APIs menu entry. You will see the list of APIs provided by Streamdata.io for the selected app:

List of APIs

– Click Edit on the API for which you want to set a specific polling frequency:API polling frequency– You can now change the frequency in Polling Frequency Section. Don’t forget to click the Save button after making the change.

 

Conclusion

We hope that this quick How-To will help you take better advantage of Streamdata.io.

As we said in the introduction, we are planning to enable configuration via API but also add the possibility to define several time frames for the same APIs, giving the possibility to adapt polling frequency depending on the time of the day.

We are continuously looking for enhancements, so feel free to leave your suggestions and comment. Enjoy!

**Original source: streamdata.io blog