<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I filter job results on relative time? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242991#M3084</link>
    <description>&lt;P&gt;This is the Python SDK document for results &lt;A href="http://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.0/results.html"&gt;http://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.0/results.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2016 23:53:27 GMT</pubDate>
    <dc:creator>ryanoconnor</dc:creator>
    <dc:date>2016-07-01T23:53:27Z</dc:date>
    <item>
      <title>How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242990#M3083</link>
      <description>&lt;P&gt;I'm able to read all results of a job through&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; job_obj.results() 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;using python-sdk. &lt;BR /&gt;
I want to get all results in the last 15 mins. &lt;BR /&gt;
It says in the doc that I can pass some params in the result() method. &lt;BR /&gt;
What are the parameters for that? &lt;BR /&gt;
Where is the documentation for available params? &lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 18:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242990#M3083</guid>
      <dc:creator>cy0926</dc:creator>
      <dc:date>2016-07-01T18:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242991#M3084</link>
      <description>&lt;P&gt;This is the Python SDK document for results &lt;A href="http://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.0/results.html"&gt;http://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.0/results.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 23:53:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242991#M3084</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-07-01T23:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242992#M3085</link>
      <description>&lt;P&gt;so I cannot filter results on relative time? &lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 23:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242992#M3085</guid>
      <dc:creator>cy0926</dc:creator>
      <dc:date>2016-07-01T23:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242993#M3086</link>
      <description>&lt;P&gt;Can you tell me a little bit more about your use case? &lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 23:56:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242993#M3086</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-07-01T23:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242994#M3087</link>
      <description>&lt;P&gt;I'm getting alert names from service. And for each alert name, I get the saved_search of that alert from service.saved_searches. Then the latest job_obj from saved_search.history(),&lt;BR /&gt;
then I want to get all results of this job_obj for any relative time such as the last 15 mins or the last hour.&lt;BR /&gt;&lt;BR /&gt;
Is it possible and is there a faster and more convenient way of doing that? Thanks. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:07:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242994#M3087</guid>
      <dc:creator>cy0926</dc:creator>
      <dc:date>2020-09-29T10:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I filter job results on relative time?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242995#M3088</link>
      <description>&lt;P&gt;I see, have you looked at the following?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAER5"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAER5&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;They give some examples in there, you should be able to pass the same parameters are in the rest API seen here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults"&gt;http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you read the REST API Docs, you should be able to also pass a post search command parameter. so effectively something like &lt;/P&gt;

&lt;P&gt;args = {"count": 100}&lt;BR /&gt;
job_obj.results(args) &lt;/P&gt;

&lt;P&gt;I think should turn 100 results. &lt;/P&gt;

&lt;P&gt;You'd have to play around with the search parameter since you want to do a timing thing but maybe&lt;/P&gt;

&lt;P&gt;args = {"search": "* earliest=-15m@m"}&lt;BR /&gt;
job_obj.results(args) &lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2016 00:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-filter-job-results-on-relative-time/m-p/242995#M3088</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-07-02T00:29:29Z</dc:date>
    </item>
  </channel>
</rss>

