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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...