Getting Data In

Help to create a new data input via REST API, plz

ventilyator
New Member

I'm trying to configure splunk via REST API. Can anybody show working POST-request to create new data input? Just 1 complete example plz. Thanks.

Tags (3)
0 Karma

Leo
Splunk Employee
Splunk Employee
curl -k -u admin:changeme -d "name=%2Ftmp%2Fthelog.log%0A" https://localhost:8089/services/data/inputs/monitor

After this request Splunk should index '/tmp/thelog.log'. Note that the argument is url-encoded.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...