<?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: export dashboard table data via rest in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339036#M40190</link>
    <description>&lt;P&gt;Thanks. I understand that approach. But i want the actual email to be dispatched from some other service (to which i am making a rest call), for reasons cited in my question above. Therefore i want to be able to access the contents of the result from the dashboard in javascript. For example , i can capture a token/parameter using $token$ convention in javascript. Is there a way to capture the query output?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2017 04:26:40 GMT</pubDate>
    <dc:creator>rohansecadvbot</dc:creator>
    <dc:date>2017-12-14T04:26:40Z</dc:date>
    <item>
      <title>export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339032#M40186</link>
      <description>&lt;P&gt;Hi, I have a custom dashboard with a table. Below the table is a button which is supposed to call a rest endpoint to send an email.&lt;BR /&gt;
The reason is , i want to send a HTML email with the contents of the dashboard table, therefore using an external email service.&lt;/P&gt;

&lt;P&gt;My question:&lt;BR /&gt;
What is the best way to send the data from the table on the button click? Is there a way to grab the data rendered in the dashboard table in javascript and call my rest endpoint with it. &lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339032#M40186</guid>
      <dc:creator>rohansecadvbot</dc:creator>
      <dc:date>2017-12-13T15:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339033#M40187</link>
      <description>&lt;P&gt;@rohansecadvbot, I think you will have to adopt opposite approach. Create your own Webpage and connect to Splunk instance using Splunk JS Stack and also pull the data. Finally code your button to push output in an email.&lt;BR /&gt;&lt;BR /&gt;
Refer to Splunk Dev documentation on the same: &lt;A href="http://dev.splunk.com/view/SP-CAAAEW5"&gt;http://dev.splunk.com/view/SP-CAAAEW5&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339033#M40187</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-13T16:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339034#M40188</link>
      <description>&lt;P&gt;Thanks @niketnillay. But my customers would rather interact with one UI and since they do most of the work in splunk, sending them to another webpage for email seems like overkill. I am looking for a way to get the data in the splunk side js and only send the required fields for email (like email addresses from a query).&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 21:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339034#M40188</guid>
      <dc:creator>rohansecadvbot</dc:creator>
      <dc:date>2017-12-13T21:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339035#M40189</link>
      <description>&lt;P&gt;The button could trigger a search that is the same as the dashboard search, but adds “| sendemail” to the end. &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sendemail"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sendemail&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 23:36:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339035#M40189</guid>
      <dc:creator>baldwintm</dc:creator>
      <dc:date>2017-12-13T23:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339036#M40190</link>
      <description>&lt;P&gt;Thanks. I understand that approach. But i want the actual email to be dispatched from some other service (to which i am making a rest call), for reasons cited in my question above. Therefore i want to be able to access the contents of the result from the dashboard in javascript. For example , i can capture a token/parameter using $token$ convention in javascript. Is there a way to capture the query output?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 04:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339036#M40190</guid>
      <dc:creator>rohansecadvbot</dc:creator>
      <dc:date>2017-12-14T04:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339037#M40191</link>
      <description>&lt;P&gt;The query output can be captured using something like $results._raw$ or $results.field$ (for specific fields from the output). Maybe?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 13:33:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339037#M40191</guid>
      <dc:creator>hurricanelabs</dc:creator>
      <dc:date>2017-12-14T13:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339038#M40192</link>
      <description>&lt;P&gt;Thanks @hurricanelabs , that doesn't work. In the example below $user$ is a regular token that renders fine in the display. But $results[0].user$ or _raw does not render the required value. (p.s. tutorials on your site are very useful. I used those to create my custom module).&lt;/P&gt;

&lt;P&gt;Search: (search) | table user, severity&lt;/P&gt;

&lt;P&gt;My Simple XML panel:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        &amp;lt;b&amp;gt;This is the email template&amp;lt;/b&amp;gt;
        &amp;lt;b&amp;gt;$user$, please check and update your system&amp;lt;/b&amp;gt;
        &amp;lt;b&amp;gt;$results[0].user$&amp;lt;/b&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Dec 2017 21:54:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339038#M40192</guid>
      <dc:creator>rohansecadvbot</dc:creator>
      <dc:date>2017-12-14T21:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339039#M40193</link>
      <description>&lt;P&gt;The javascript referenced here worked for me.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/462111/how-to-store-values-in-token-from-specific-cell-of.html"&gt;https://answers.splunk.com/answers/462111/how-to-store-values-in-token-from-specific-cell-of.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 00:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339039#M40193</guid>
      <dc:creator>rohansecadvbot</dc:creator>
      <dc:date>2017-12-19T00:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: export dashboard table data via rest</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339040#M40194</link>
      <description>&lt;P&gt;@rohansecadvbot, glad it worked, do upvote the answer you referred as well so that it benefits others.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 02:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/export-dashboard-table-data-via-rest/m-p/339040#M40194</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-19T02:41:18Z</dc:date>
    </item>
  </channel>
</rss>

