All Apps and Add-ons

Splunk Add-On Builder: Pre-Request Script

nicholashebert
Engager

In order to hit the endpoint needed to get data from an external API, I need to make a call to get a valid access token from the external API. I use that access token to make subsequent calls to the API, specifically the endpoint needed for data input into my Splunk Add-On.

My understanding is that when using REST for the data input method, you are only able to use a Global Account, passed into the headers, to do authenticated calls. I do not see a way to do a pre-request script in order to get the access token prior to making the subsequent call.

Is this possible in a different way?

Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...