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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...