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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...