All Apps and Add-ons

REST API Modular Input - Token not updating

quihong
Path Finder

Hello,

I created a new token in the tokens.py file, however it is not updating as expected.

I found this posting - https://answers.splunk.com/answers/311261/rest-api-modular-input-app-tokens-not-resetting.html - which the author stated, "Token substitution only happens once , before the initial request.".

There are two solution presented:

1) Use a custom Response Handler to set the parameters for the next request
2) Modify the rest.py file (endpoint_list = replaceTokens(original_endpoint)) so that the tokens are always updated before a REST API call.

Solution two makes more sense to me (expected behavior), but I wanted to get the author/community opinion on this.

Thank you.

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...