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.
buckets = getStatusBuckets()
Number of status buckets requested for the current job.
var context = this.getContext(); var search = context.get('search'); console.log('Number of status buckets = ' + search.job.getStatusBuckets().toString());