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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...