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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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