Splunk Dev

How to expand macros in search using Splunk Python SDK?

mikesmyk
New Member

Is there a way to expand all macros of a search with the python SDK?
In the end we want to have the whole search text in a python variable to modify it.

So far our solution is to get the search text using the splunk SDK and then search for macros and replace them with the definition of the macro, which we have to get separately with the SDK.
What we like to have is some function, that returns the search text with all macros expanded.

Is there something like this in the SDK which we did not found so far?

Splunk Enterprise Version: 6.6.4

Thanks in advance

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...