Splunk JS SDK
SDK for JavaScript and it's now a much better option.
Don't use this. Since I wrote it, Splunk has improved their own- Requires jQuery 1.7+ * (really, just requires the jQuery deferred object)
To get this to work, I ended up turning off SSL from within the Splunk management console. Our Splunk installation is internal to our network so this didn't seem like a problem.
splunk.login - returns a Deferred promise object. You must wait until after login is complete to call search.
splunk.search - executes search queries. Very basic at this point. Makes a best effort to return JSON data. Splunk's REST API is surprisingly inconsistent with JSON.
Usage:
splunk.login('username', 'password', { address: 'http://splunk.internal:8089/' })
.done(function(obj) {
splunk.search('my splunk query', '-15m', 'now', baseOpts)
.done(function(s) {
console.log('all done!');
console.log(s);
});
});