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!

More Control Over Your Monitoring Costs with Archived Metrics!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...