Application Framework Reference

Splunk API

getStatusBuckets()

The getStatusBuckets() method gets the number of status buckets for the current job.

Status buckets represent the status_buckets parameter in the Splunk REST API endpoint /services/search/jobs. Essentially, if status_buckets is zero, raw events are not persisted for the job. If status_buckets is greater than zero, raw events persist for the job.

Synopsis

buckets = getStatusBuckets()

Return Value

Integer

Number of status buckets requested for the current job.

Example

var context = this.getContext();
var search = context.get('search');
console.log('Number of status buckets = ' + search.job.getStatusBuckets().toString());
 

See Also

areResultsTransformed()