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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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