The getPath() method gets the current location path without the localization segment.
results = Splunk.util.getPath()
String
Current location path without localization.
var pathVal = Splunk.util.getPath();
Splunk and our developer community are here to help.