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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...