Skip to content

Commit ce8d09c

Browse files
Jeremy CookPhilippe Tang
authored andcommitted
[DVPL-10898] Update all jobs endpoints to use v2 paths
[DVPL-10898] v1 and v2 path for search/parser
1 parent ebff1ba commit ce8d09c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

splunklib/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ def parse(self, query, **kwargs):
558558
:type kwargs: ``dict``
559559
:return: A semantic map of the parsed search query.
560560
"""
561+
if self.splunk_version >= (9,):
562+
return self.get("search/v2/parser", q=query, **kwargs)
561563
return self.post("search/parser", q=query, **kwargs)
562564

563565
def restart(self, timeout=None):

0 commit comments

Comments
 (0)