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");
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..