Getting Data In

RESTful call to a new module

wward
Explorer

Hi, I've created a new module 'MyAwesomeModule', is there a way I can restfully retrieve the JSON output using java?

In other words, I'm curious if I can avoid recoding the generateRestults() method in 'MyAwesomeModule.py'

Thanks!
Wade

Tags (4)
0 Karma

Damien_Dallimor
Ultra Champion

If I understand correctly , you would need to code the logic you want to be reusable in a custom REST endpoint. Then a Java client could call this REST endpoint. Your implementation of generateResults() in your server side python handler (MyAwesomeModule.py) would also delegate off to this custom REST endpoint.

wward
Explorer

That answers my question. Are there any examples you would suggest to look at in splunk docs that I can reference as starting point to begin creating this kind of custom REST endpoint?
Thanks

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...