All Apps and Add-ons

Dynamically changing the REST Endpoint URL

meson3902
Engager

I have set up a twitter input and now I am attempting to set up an input from Fitbit. The Fitbit API calls for using the URL to specify the necessary parameters. For example, to get activities for a specific date I would have to use a URL with a date in it. I see the feature listed in the documentation so I would like a hint where I should start looking to find a solution. Thanks.

1 Solution

Damien_Dallimor
Ultra Champion

The latest release of the REST API Modular Input , v1.3.4 , has support for dynamic token substitution in the Endpoint URL.

So for example , with the Fitbit URL :

http://api.fitbit.com/1/user/228TQ4/activities/date/2010-02-25.json

You could enter this in your REST API Modular Input as :

http://api.fitbit.com/1/user/228TQ4/activities/date/$datetoday$.json

View solution in original post

Damien_Dallimor
Ultra Champion

The latest release of the REST API Modular Input , v1.3.4 , has support for dynamic token substitution in the Endpoint URL.

So for example , with the Fitbit URL :

http://api.fitbit.com/1/user/228TQ4/activities/date/2010-02-25.json

You could enter this in your REST API Modular Input as :

http://api.fitbit.com/1/user/228TQ4/activities/date/$datetoday$.json

meson3902
Engager

Thanks, this works perfectly.

0 Karma

bmas10
Explorer

Are there any other tokens one could use?

0 Karma

Damien_Dallimor
Ultra Champion

Give me a few hours , I'll need to add some functionality in the Mod Input to support this style of request format

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...