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!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...