<?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: Can you query external systems with the curl command in JKats Toolkit? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242534#M27469</link>
    <description>&lt;P&gt;Also please note that your username / password will be stored in the splunk internal indexes because splunk tracks the searches you run and you're putting a user/pass in the search.  Finally, the streaming option only enables streaming the data field through.  It will not for example, allow you to stream in the user/pass from fields.  Although it wouldnt be too difficult to achieve this if it is desired.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2016 02:52:54 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2016-08-23T02:52:54Z</dc:date>
    <item>
      <title>Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242525#M27460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is it possible to query external systems (non-Splunk) with the curl command provided in the JKats toolkit?  What is the "data" option for"  Posting? &lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 18:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242525#M27460</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-08-22T18:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242526#M27461</link>
      <description>&lt;P&gt;Hi a212830,&lt;/P&gt;

&lt;P&gt;The command IS intended to allow you to query external systems.&lt;/P&gt;

&lt;P&gt;Sorry for the limited documentation.  I'm working on documentation as I add commands.&lt;/P&gt;

&lt;P&gt;... | curl post false domain.com/endPoint&lt;BR /&gt;
... | curl get false domain.com/endPoint&lt;BR /&gt;
... | curl post true domain.com/someSSLEndpoint&lt;BR /&gt;
... | curl get true domain.com/someSSLendPoint&lt;/P&gt;

&lt;P&gt;The true or false adds https:// or &lt;A href="http://," target="test_blank"&gt;http://,&lt;/A&gt; respectively.  Here's syntax for actually sending data through to a nonssl endpoint:&lt;/P&gt;

&lt;P&gt;... | curl post false domain.com/endPoint '{"key":"value"}' user password&lt;/P&gt;

&lt;P&gt;Or if there's no user or password required &lt;/P&gt;

&lt;P&gt;... | curl post false domain.com/endPoint '{"key":"value"}'&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 22:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242526#M27461</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-22T22:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242527#M27462</link>
      <description>&lt;P&gt;When it returns the data from the endpoint it will be in a field called "curl_output".  That field will contain exactly what the endpoint returned in the request body. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 22:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242527#M27462</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-22T22:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242528#M27463</link>
      <description>&lt;P&gt;Thanks.  This is interesting - always thought that it was something missing from Splunk.  I have lots of people that want to query external sites via REST, and either create lookups or use as part of their search.&lt;/P&gt;

&lt;P&gt;Anyway, I tried this, and got zero events, but think that it should work:&lt;/P&gt;

&lt;P&gt;| curl get false "vlcov57:8581/odata/api/devices?" admin admin &lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 00:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242528#M27463</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-08-23T00:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242529#M27464</link>
      <description>&lt;P&gt;Let me test and get back to you tomorrow.  I'm pretty sure I made the logic understand your intention with or without  the data payload.  Maybe I only debugged with post... Happy to fix and take any enhancement requests as well.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 00:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242529#M27464</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T00:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242530#M27465</link>
      <description>&lt;P&gt;Awesome. Thanks.  My queries could get quite complicated  - the system that I'm interested creates some long url's.    &lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 00:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242530#M27465</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-08-23T00:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242531#M27466</link>
      <description>&lt;P&gt;Do you have anything before the curl command?&lt;/P&gt;

&lt;P&gt;Maybe it works if you add events in the pipe first:&lt;/P&gt;

&lt;P&gt;| makeresults count=1 | curl ...&lt;/P&gt;

&lt;P&gt;Been a moment since I wrote it&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 00:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242531#M27466</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T00:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242532#M27467</link>
      <description>&lt;P&gt;You'll find my email in the app.conf or in any of the Python files.  Send me your requirements and I'll do what I can.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 00:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242532#M27467</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T00:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242533#M27468</link>
      <description>&lt;P&gt;Ok so this wasnt a true "generating" command and required events prior to it.&lt;/P&gt;

&lt;P&gt;I've fixed that in release 0.04 of the toolkit.&lt;/P&gt;

&lt;P&gt;Now you can use it with or without prior search results in the pipeline.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | curl post false domain.com/endPoint   Will work now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However I believe there will also be a need to use data from the search pipeline.  Lets say you have an event that generates JSON which you want to then post to an api.  Something like JSONfield='{"key":"value"}'.  You can now specify the option 'streaming=true' and then the placeholder for data will look for the field of that name.  Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |makeresults count=1 | eval jsonData="{'name':'tester','value':'testing'}" |  curl post true localhost:80/endPoint jsonData streaming=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Furthermore, this allows you to make a post/get per event in the pipeline.  This search would make 10 posts because makeresults will produce 10 events with the same jsonData field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |makeresults count=10 | eval jsonData="{'name':'tester','value':'testing'}" |  curl post true localhost:80/endPoint jsonData streaming=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please do enjoy!!!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 02:49:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242533#M27468</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T02:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242534#M27469</link>
      <description>&lt;P&gt;Also please note that your username / password will be stored in the splunk internal indexes because splunk tracks the searches you run and you're putting a user/pass in the search.  Finally, the streaming option only enables streaming the data field through.  It will not for example, allow you to stream in the user/pass from fields.  Although it wouldnt be too difficult to achieve this if it is desired.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 02:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242534#M27469</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T02:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242535#M27470</link>
      <description>&lt;P&gt;Great!  Any chance it can format it and respect cr/nl?  It's just one big stream, which is ugly.  Be nice if it could be separate events.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 11:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242535#M27470</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-08-23T11:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242536#M27471</link>
      <description>&lt;P&gt;Since API's can be a bit wild in their behavior, I dont want to get into the process of transforming the data. There's too many variables...&lt;/P&gt;

&lt;P&gt;Instead I'd rather leave it up to you to use | rex field=curl_output "", spath, xpath, extract,, or xmlkv, etc. after the curl command. If you can imagine... your API may return JSON, another might return XML, another plain text, another binary, another broken JSON, another bad xml, etc etc etc. It's too many scenarios for me to anticipate in code, and it's easier for me to put the onus on you to extract what you need from your api.&lt;/P&gt;

&lt;P&gt;All that being said... i found a couple more bugs and squashed them in release 0.05.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1751i84477B2E98A962CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 12:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242536#M27471</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T12:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can you query external systems with the curl command in JKats Toolkit?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242537#M27472</link>
      <description>&lt;P&gt;Understood.  Thanks!  Great utility! &lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 14:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-you-query-external-systems-with-the-curl-command-in-JKats/m-p/242537#M27472</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-08-23T14:32:00Z</dc:date>
    </item>
  </channel>
</rss>

