Getting Data In

oneshot POST message body

kevintelford
Path Finder

Is there a way to specify parameters in a POST to the oneshot endpoint? I can successfully add files -

curl -k -u admin:changeme -d
'name=/path/to/my/file'
https://localhost:8089/services/data/input/oneshot

But I am not able to add any other optional parameters such as host, index, etc. I've also tried doing a JSON POST with no luck. Anytime I add additional parameters it complains about not having a regular file.

Thanks,
Kevin

Tags (4)

ykys97
Explorer

Try this

(first create an index 'test_index')

curl -k -u admin:changeme -d "name=/path/to/myfile" -d "index=test_index" -d "sourcetype=test_source" https://localhost:8089/services/data/inputs/oneshot

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...