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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...