All Apps and Add-ons

REST API Modular Input: How to pull Strava API data into Splunk?

bmo017
Path Finder

I am seeking assistance in using Splunk to pull in Strava API data, but am having difficulties doing so with the information Strava is giving in the link below and my limited understanding of API pulls.

https://strava.github.io/api/

I have used used the example of using twitter and got that up and running, but cannot get the REST API pulls working with Strava as it sits now.

1 Solution

johnansett
Communicator

There are a couple of steps you need to take here. Firstly, in order to test I created a Strava app:
https://www.strava.com/settings/api
This will provide you with the Client ID and Client Secret.

In Splunk, I used the REST API Modular Input App and created the following inputs.conf:

[rest://Strava]
auth_type = oauth2
endpoint = https://www.strava.com/api/v3/athlete
http_method = GET
index = main
index_error_response_codes = 1
response_type = json
sequential_mode = 0
sourcetype = strava-api
streaming_request = 1
disabled = 0
oauth2_access_token = <your access token>
oauth2_client_id = <your client id>
oauth2_client_secret = <your client secret>

You can also test using curl to ensure that the oauth is working. From there it's a matter of defining the parameters per their API documentation (http://strava.github.io/api/)

View solution in original post

0 Karma

johnansett
Communicator

There are a couple of steps you need to take here. Firstly, in order to test I created a Strava app:
https://www.strava.com/settings/api
This will provide you with the Client ID and Client Secret.

In Splunk, I used the REST API Modular Input App and created the following inputs.conf:

[rest://Strava]
auth_type = oauth2
endpoint = https://www.strava.com/api/v3/athlete
http_method = GET
index = main
index_error_response_codes = 1
response_type = json
sequential_mode = 0
sourcetype = strava-api
streaming_request = 1
disabled = 0
oauth2_access_token = <your access token>
oauth2_client_id = <your client id>
oauth2_client_secret = <your client secret>

You can also test using curl to ensure that the oauth is working. From there it's a matter of defining the parameters per their API documentation (http://strava.github.io/api/)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...