<?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 to construct hyperlink from sid in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450242#M9624</link>
    <description>&lt;P&gt;Hi Wang,&lt;/P&gt;

&lt;P&gt;Try the following URL, to open Search page with sid&lt;BR /&gt;
It will return the same results as the original query and for the same time duration&lt;/P&gt;

&lt;P&gt;&lt;A href="http://localhost:8000/en-US/app/search/search?sid=your_sid"&gt;http://localhost:8000/en-US/app/search/search?sid=your_sid&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please accept the answer if it works for you.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2018 08:41:28 GMT</pubDate>
    <dc:creator>gaurav_maniar</dc:creator>
    <dc:date>2018-11-01T08:41:28Z</dc:date>
    <item>
      <title>How to construct hyperlink from sid</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450239#M9621</link>
      <description>&lt;P&gt;I am using REST API search endpoints to invoke a search.  When the search completes, I get a SID from the json response.  I then create an email with the search result.  In additional, I want to include a hyperlink in the email that will take me to splunk displaying the same result (with the same criteria including the time window).  Can I use the SID to do this (as long as the SID hasn't expired)?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 22:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450239#M9621</guid>
      <dc:creator>wang</dc:creator>
      <dc:date>2018-10-30T22:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to construct hyperlink from sid</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450240#M9622</link>
      <description>&lt;P&gt;Hi @wang,&lt;/P&gt;

&lt;P&gt;You can achieve this, while creating new job using REST API please provide &lt;EM&gt;unique&lt;/EM&gt; &lt;CODE&gt;id&lt;/CODE&gt; to search job so that will act as &lt;CODE&gt;SID&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Something like &lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs&lt;/A&gt; --data-urlencode search="search index=_internal | stats count by host" -d id=mysearch_31102018114300&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;And after that you can create hyperlink with email so hyperlink should be like this &lt;CODE&gt;http[s]://SEARCH_HEAD:PORT/app/APP_NAME/search?q=%7Cloadjob%20SID&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Based on example I have provided with &lt;CODE&gt;id=mysearch_31102018114300&lt;/CODE&gt;, hyperlink should be like this &lt;CODE&gt;http[s]://SEARCH_HEAD:PORT/app/APP_NAME/search?q=%7Cloadjob%20mysearch_31102018114300&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;As I was not able to fetch latestime from job ID so we can't provide earliest and latest time in hyperlink however when you use loadjob it will exactly load same result when job ran with given timeframe.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:51:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450240#M9622</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-10-31T11:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to construct hyperlink from sid</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450241#M9623</link>
      <description>&lt;P&gt;I tried this with the SID I got back from the response:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://SPLUNK_HOST/en-US/app/search/search?q=%7Cloadjob%201541017578.20031_E86B55B0-BB4E-4D2E-9BA0-23B22288B1CA"&gt;https://SPLUNK_HOST/en-US/app/search/search?q=%7Cloadjob%201541017578.20031_E86B55B0-BB4E-4D2E-9BA0-23B22288B1CA&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And got this error:&lt;BR /&gt;
Error in 'SearchOperator:loadjob': The search artifact for job '1541017578.20031_E86B55B0-BB4E-4D2E-9BA0-23B22288B1CA' is not available because we cannot proxy an ad-hoc job in a searchhead cluster. Please run the search locally.&lt;/P&gt;

&lt;P&gt;What does this mean?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 20:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450241#M9623</guid>
      <dc:creator>wang</dc:creator>
      <dc:date>2018-10-31T20:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to construct hyperlink from sid</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450242#M9624</link>
      <description>&lt;P&gt;Hi Wang,&lt;/P&gt;

&lt;P&gt;Try the following URL, to open Search page with sid&lt;BR /&gt;
It will return the same results as the original query and for the same time duration&lt;/P&gt;

&lt;P&gt;&lt;A href="http://localhost:8000/en-US/app/search/search?sid=your_sid"&gt;http://localhost:8000/en-US/app/search/search?sid=your_sid&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please accept the answer if it works for you.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 08:41:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450242#M9624</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2018-11-01T08:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to construct hyperlink from sid</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450243#M9625</link>
      <description>&lt;P&gt;Oh, I didn't know that you are running Search Head Cluster, in SHC adhoc job will not be replicated to other members in same cluster and in your case job when you try to construct URL and hit that LB is redirecting it to other member on which job didn't run.&lt;/P&gt;

&lt;P&gt;You can try something like this but I am not sure whether this will work or not, when you will fetch data from job with SID, you will able to find search head from &lt;CODE&gt;searchProviders&lt;/CODE&gt;, when I ran 2-3 jobs generally Search Head will be at first position and Indexers will start from 2nd position. If this will be consistent in all jobs then you can fetch Search Head from there construct hyperlink with Search Head directly (Unfortunately you will not able to use VIP configured for SHC members in hyperlink.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 14:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-construct-hyperlink-from-sid/m-p/450243#M9625</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-11-01T14:28:59Z</dc:date>
    </item>
  </channel>
</rss>

