Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Get a list of objects(saved searches) in a namespace
*/
private static void namespaceGetEntityExample() {
Service splunkService = connectAndLoginToSplunkExample();
ServiceArgs namespace = new ServiceArgs();
namespace.setOwner("admin");
namespace.setApp("search");
SavedSearchCollection savedSearches = splunkService.getSavedSearches(namespace);
for (SavedSearch entity : savedSearches.values()) {
System.out.println(entity.getTitle() + "\n" + " ("
+ entity.getSearch() + ")");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.