Splunk Dev

Does anyone know the formatting for doing a post using the splunkjs Endpoints function to an inputs.conf?

ohbuckeyeio
Communicator

Does anyone know the formatting for doing a post using the splunkjs Endpoints function to an inputs.conf?

I can get it like this:

let splunk_service = splunkjs.mvc.createService({owner: 'nobody'})
let endpoint = new splunkjs.Service.Endpoint(splunk_service, "data/inputs/mymod/test")
endpoint.get()

But a post isn’t working:

 endpoint.post({'myfield': '123abc'})

Sorry for the formatting. I’m on mobile and see no way to add code blocks.

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...