init

splunkjs.Service.Pivot.init

Constructor for a pivot. SDK users are not expected to invoke this constructor directly.

Syntax

init: function(service, props)

Parameters

Name Type Description
service splunkjs.Service

A Service instance.

props Object

A dictionary of properties to set:
- search (string): The search string for running the pivot report.
- drilldown_search (string): The search for running this pivot report using drilldown.
- open_in_search (string): Equivalent to search parameter, but listed more simply.
- pivot_search (string): A pivot search command based on the named data model.
- tstats_search (string|null): The search for running this pivot report using tstats, null if acceleration is disabled.

run

splunkjs.Service.Pivot.run

Starts a search job running this pivot, accelerated if possible.

Syntax

run: function(args, callback)

Parameters

Name Type Description
args Object

A dictionary of properties for the search job (optional). For a list of available parameters, see Search job parameters on Splunk Developer Portal.
Note: This method throws an error if the exec_mode=oneshot parameter is passed in with the properties dictionary.

callback Function

A function to call when done creating the search job: (err, job).