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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...