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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...