Skip to content

Commit c08179b

Browse files
committed
Update service.js
updated version checks with "9.0.2" to enable v2 Search APIs
1 parent 9faeb2e commit c08179b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/service.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
params.q = query;
553553

554554
// Pre-9.0 uses GET and v1 endpoint
555-
if (this.versionCompare("9.0") < 0) {
555+
if (this.versionCompare("9.0.2") < 0) {
556556
return this.get(Paths.parser, params, function(err, response) {
557557
if (err) {
558558
callback(err);
@@ -3336,7 +3336,7 @@
33363336
*/
33373337
path: function () {
33383338
// Pre-9.0 uses v1 endpoint
3339-
if (this.versionCompare("9.0") < 0) {
3339+
if (this.versionCompare("9.0.2") < 0) {
33403340
return Paths.jobs + "/" + encodeURIComponent(this.name);
33413341
}
33423342
// Post-9.0 uses v2 endpoint
@@ -3485,7 +3485,7 @@
34853485
var eventsPath = Paths.jobsV2 + "/" + encodeURIComponent(this.name) + "/events";
34863486
// Splunk version pre-9.0 doesn't support v2
34873487
// v1(GET), v2(POST)
3488-
if (this.versionCompare("9.0") < 0) {
3488+
if (this.versionCompare("9.0.2") < 0) {
34893489
eventsPath = Paths.jobs + "/" + encodeURIComponent(this.name) + "/events";
34903490
return this.get(eventsPath, params, function(err, response) {
34913491
if (err) {
@@ -3601,7 +3601,7 @@
36013601
var resultsPreviewPath = Paths.jobsV2 + "/" + encodeURIComponent(this.name) + "/results_preview";
36023602
// Splunk version pre-9.0 doesn't support v2
36033603
// v1(GET), v2(POST)
3604-
if (this.versionCompare("9.0") < 0) {
3604+
if (this.versionCompare("9.0.2") < 0) {
36053605
resultsPreviewPath = Paths.jobs + "/" + encodeURIComponent(this.name) + "/results_preview";
36063606
return this.get(resultsPreviewPath, params, function(err, response) {
36073607
if (err) {
@@ -3654,7 +3654,7 @@
36543654
var resultsPath = Paths.jobsV2 + "/" + encodeURIComponent(this.name) + "/results";
36553655
// Splunk version pre-9.0 doesn't support v2
36563656
// v1(GET), v2(POST)
3657-
if (this.versionCompare("9.0") < 0) {
3657+
if (this.versionCompare("9.0.2") < 0) {
36583658
resultsPath = Paths.jobs + "/" + encodeURIComponent(this.name) + "/results";
36593659
return this.get(resultsPath, params, function(err, response) {
36603660
if (err) {
@@ -3995,7 +3995,7 @@
39953995
*/
39963996
path: function () {
39973997
// Pre-9.0 uses v1 endpoint
3998-
if (this.versionCompare("9.0") < 0) {
3998+
if (this.versionCompare("9.0.2") < 0) {
39993999
return Paths.jobs;
40004000
}
40014001
// Post-9.0 uses v2 endpoint

0 commit comments

Comments
 (0)