Getting Data In

How do I log in using the Splunk REST API with java?

deanilol
Explorer

Hi,

How do I log in using Splunk RESTful API? I can only find examples in curl. Would be nice if anyone could send some java code example on how to translate curl into java.

http://docs.splunk.com/Documentation/Splunk/6.2.2/RESTREF/RESTaccessExamples

Thanks!

Tags (3)
0 Karma

vganjare
Builder

Hi,

You can try using splunk Java SDK for accessing splunk functionality in java. You can find more details at http://dev.splunk.com/java

Java SDK have various utility classes which can be used to perform any splunk operation.

Few examples using Java SDK are mentioned here: http://dev.splunk.com/view/java-sdk/SP-CAAAEFH

Thanks!!!

deanilol
Explorer

Hi,

Thanks for the fast response!

I wan't to create dashboards from java code and from what I've read one is not possible to do this with Splunk SDK. I found this link that might solve my problem but for that I need to connect to the REST API.

http://answers.splunk.com/answers/201952/can-you-use-the-splunk-rest-api-or-javascript-sdk.html?utm_...

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...