Splunk Dev

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

ohbuckeyeio
Path Finder

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!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...