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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...