Splunk Search

Save jobs/searches using Java SDK

rahul_matharu
New Member

How can we save a job or search after creating it. I further need to create an alert out of the job.

I understand how to create a search job only as of now..

Job job = service.getJobs().create("search*|head 10");

Tags (3)
0 Karma

rahul_matharu
New Member

String searchString = "search*|head 10";
SavedSearch firstSavedSearch = service.getSavedSearches().create("newSavedSearchFromAPI", searchString);

I saw the overloaded create() fn implementations. The above code creates a saved search..

0 Karma
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...