App Framework Reference

Controller API

class BaseController

The BaseController class is an abstract class for creating a Splunk Web controller or module controller. This is the base class from which all module and custom controllers are derived.

Language Binding

Python

Inheritance

object -> BaseController

Inherited By

JobsControllerSearchController
ModuleController

Implementation Location

$SPLUNK_HOME/etc/apps/<appName>/appserver/controllers/<controllerName>

Constructor

Methods

conf() Beginning with Splunk version 4.2, use the Model API, instead, to work with Splunk configuration objects.
make_route() A wrapper, returning a URL path for a given route.
make_url() A wrapper returning a relative URL for the specified path.
push_version() A wrapper, forcing a version increment on application server static assets, forcing browsers to update cached static content.
redirect_to_route() A convenience method, wrapping a call to cherrypy.HTTPRedirect() with the redirect URI.
redirect_to_url() A convenience method, wrapping a call to cherrypy.HTTPRedirect() with the redirect URI.
render_json() Returns JSON-formatted response data.
render_template() Renders the specified Mako template.
setup_mako() Initializes an instance of TemplateLookup .
strip_url() A wrapper, returning a URL without the root_endpoint or i18n prefixes.