Getting Data In

How can I get a list of data inputs using the REST API?

bbknowles
Explorer

I'd like to get a list of the data inputs and - ideally - the actual search behind each input.

Is it possible to do this using the REST command in the Splunk GUI?

0 Karma

bbknowles
Explorer

Yes. But it's okay. I figured out a way, using this search:

index=_internal host=PHSWEB2257 sourcetype=dbx_server task | dedup task
| table task query

0 Karma

bbknowles
Explorer

Sorry. I guess I didn't communicate that well. I actually want a list of the db connections and the searches or queries behind them.

0 Karma

niketn
Legend

What do you mean by DB Connection? Are you using DB Connect app?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@bbknowles try the following:

| rest /services/data/inputs/all/

You can refer to Splunk REST API Document for Data Inputs
Usually once you open any view in Splunk UI, based on URL in the browser you should be able to figure out which REST API (or endpoint documentation you should refer to).

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

jnudell_2
Builder

Could you be more specific about what you mean by data inputs. There are many ways to get data into Splunk, and you won't be able to get information for certain types of data inputs by using REST.

You'll also need to clarify what you mean by "the search behind each input". There is no "search" associated with a monitor type input, it just watches files for changes. There is a search behind db connect inputs, but it's an SQL query, not a search.

In general, I would say you could get some information using REST, but not all information about data inputs.

Is there a specific use case you're trying to address?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...