Splunk Dev

SplunkJS with SimpleXML Dashboard: How to get a service object?

David
Splunk Employee
Splunk Employee

A lot of things in SplunkJS require you to have a service object. I've read in a bunch of places that splunkjs.Service should work, but it hasn't for me. How do I get a SplunkJS service object?

0 Karma
1 Solution

David
Splunk Employee
Splunk Employee

Despite some of the docs I saw, the answer is quite simply:

// Get access to Splunk objects via the JavaScript SDK
var service = mvc.createService();

Courtesy of: http://dev.splunk.com/view/SP-CAAAE25#Addingcode:usingJavaScriptandSearchProcessingLanguage-Usingthe...

View solution in original post

0 Karma

David
Splunk Employee
Splunk Employee

Despite some of the docs I saw, the answer is quite simply:

// Get access to Splunk objects via the JavaScript SDK
var service = mvc.createService();

Courtesy of: http://dev.splunk.com/view/SP-CAAAE25#Addingcode:usingJavaScriptandSearchProcessingLanguage-Usingthe...

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...