<?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 Data type for cURL with JSON response in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46182#M8699</link>
    <description>&lt;P&gt;Data source for my requirement is coming from HTTP request. I can fetch the data in command line using CURL command and seeking help on how to import that same in Splunk.  The response expected is in json format. &lt;/P&gt;

&lt;P&gt;I am going through the  reference - &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Spath"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Spath&lt;/A&gt; but it doesnt specify on how to import the data.  Any help on how to feed splunk with CURL data would be great. &lt;/P&gt;

&lt;P&gt;For example,  my request in command line is like - curl "&lt;A href="http://finance.google.com/finance/info?client=ig&amp;amp;q=NASDAQ%3aGOOG"&gt;http://finance.google.com/finance/info?client=ig&amp;amp;q=NASDAQ%3aGOOG&lt;/A&gt;"&lt;/P&gt;

&lt;P&gt;and the response - // [ { "id": "694653" ,"t" : "GOOG" ,"e" : "NASDAQ" ,"l" : "873.32" ,"l_cur" : "873.32" ,"s": "0" ,"ltt":"4:00PM EDT" ,"lt" : "May 24, 4:00PM EDT" ,"c" : "-9.47" ,"cp" : "-1.07" ,"ccol" : "chr" } ]&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2013 06:31:39 GMT</pubDate>
    <dc:creator>msn2507</dc:creator>
    <dc:date>2013-05-26T06:31:39Z</dc:date>
    <item>
      <title>Data type for cURL with JSON response</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46182#M8699</link>
      <description>&lt;P&gt;Data source for my requirement is coming from HTTP request. I can fetch the data in command line using CURL command and seeking help on how to import that same in Splunk.  The response expected is in json format. &lt;/P&gt;

&lt;P&gt;I am going through the  reference - &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Spath"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Spath&lt;/A&gt; but it doesnt specify on how to import the data.  Any help on how to feed splunk with CURL data would be great. &lt;/P&gt;

&lt;P&gt;For example,  my request in command line is like - curl "&lt;A href="http://finance.google.com/finance/info?client=ig&amp;amp;q=NASDAQ%3aGOOG"&gt;http://finance.google.com/finance/info?client=ig&amp;amp;q=NASDAQ%3aGOOG&lt;/A&gt;"&lt;/P&gt;

&lt;P&gt;and the response - // [ { "id": "694653" ,"t" : "GOOG" ,"e" : "NASDAQ" ,"l" : "873.32" ,"l_cur" : "873.32" ,"s": "0" ,"ltt":"4:00PM EDT" ,"lt" : "May 24, 4:00PM EDT" ,"c" : "-9.47" ,"cp" : "-1.07" ,"ccol" : "chr" } ]&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2013 06:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46182#M8699</guid>
      <dc:creator>msn2507</dc:creator>
      <dc:date>2013-05-26T06:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data type for cURL with JSON response</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46183#M8700</link>
      <description>&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/apps/69078/importutil"&gt;importutil&lt;/A&gt; should do just what you want.&lt;/P&gt;

&lt;P&gt;If you want to setup a more permanent input, you should set up a &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/AdvancedDev/ScriptedInputsIntro"&gt;scripted input&lt;/A&gt; that uses for instance curl to get the data and then echoes it back into Splunk.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2013 06:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46183#M8700</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-26T06:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Data type for cURL with JSON response</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46184#M8701</link>
      <description>&lt;P&gt;Thanks for your reply.  I am going down the path of scripted input as importutil doesnt support cURL. &lt;/P&gt;

&lt;P&gt;I have couple of questions &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; I am following this reference to extract the fields but the search (sourcetype="count_size" | spath output=myfield path=text.size) doesnt yield anything for a response like this - &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;{"text": {&lt;BR /&gt;
        "data": "Click here",&lt;BR /&gt;
        "size": 36,&lt;BR /&gt;
        "data": "Learn more",&lt;BR /&gt;
        "size": 37,&lt;BR /&gt;
        "data": "Help",&lt;BR /&gt;
        "size": 38,&lt;BR /&gt;
         }&lt;BR /&gt;
      os_version : "10.9,&lt;BR /&gt;
      updated_at : "2013-05-27T04:24:57Z",&lt;BR /&gt;
      user_string : ""&lt;BR /&gt;
    }&lt;/P&gt;

&lt;P&gt;Please help me construct an spath search for json response.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;How do I tell Splunk to capture only the delta data of the request instead of capturing the entire response for every fetch ?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46184#M8701</guid>
      <dc:creator>msn2507</dc:creator>
      <dc:date>2020-09-28T13:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Data type for cURL with JSON response</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46185#M8702</link>
      <description>&lt;P&gt;Guys, any help ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 04:01:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-type-for-cURL-with-JSON-response/m-p/46185#M8702</guid>
      <dc:creator>msn2507</dc:creator>
      <dc:date>2013-05-28T04:01:39Z</dc:date>
    </item>
  </channel>
</rss>

