Splunk Dev

Writing own REST API in Splunk app

lewu_splunk
Splunk Employee
Splunk Employee

The Django bindings page in Splunk>dev says it allows apps to have server-side Python. Is it possible to make a REST API in this server side Python? (Not the Splunk REST API which I know is used to interact with the instance, but my own REST API.) Is it possible to use Splunk's Django to do so?

I mainly ask the second question because I know Splunk uses its own Python implementation so I wouldn't be able to install a REST API library to use.

Tags (2)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

So unless you are using version 5.X, I wouldn't recommend Django. The Web Framework is more robust and integrated in 6.X. But yes, you can create your own "REST API" with server side python. The element you are looking for is called a "Controller" and is not documented quite as well as other dev features.

http://docs.splunk.com/Documentation/Splunk/6.2.3/ModuleRef/BaseController

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

So unless you are using version 5.X, I wouldn't recommend Django. The Web Framework is more robust and integrated in 6.X. But yes, you can create your own "REST API" with server side python. The element you are looking for is called a "Controller" and is not documented quite as well as other dev features.

http://docs.splunk.com/Documentation/Splunk/6.2.3/ModuleRef/BaseController
Get Updates on the Splunk Community!

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 ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...