<?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: Use curl to get ip_intel information from Splunk ES in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364573#M66405</link>
    <description>&lt;P&gt;Unfortunately this is not what we need. We want to query whether an IP address is in the ip_intel collection. This curl command returns the item with the key. We want the item that match a given ip address.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 18:30:03 GMT</pubDate>
    <dc:creator>ibmresilient</dc:creator>
    <dc:date>2018-03-21T18:30:03Z</dc:date>
    <item>
      <title>Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364566#M66398</link>
      <description>&lt;P&gt;We follow the example from this page (&lt;A href="http://docs.splunk.com/Documentation/ES/4.7.2/API/ThreatIntelligenceAPIreference" target="_blank"&gt;http://docs.splunk.com/Documentation/ES/4.7.2/API/ThreatIntelligenceAPIreference&lt;/A&gt;) to run a curl command:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/services/data/threat_intel/item/ip_intel" target="_blank"&gt;https://localhost:8089/services/data/threat_intel/item/ip_intel&lt;/A&gt;  -d item='{"ip":one_ip_address}'  -G -X  GET&lt;BR /&gt;
where one_ip_address is one from the ip_intel collection&lt;/P&gt;

&lt;P&gt;Splunk ES returns error:&lt;BR /&gt;
{"status": false, "message": "Found an invalid record in item list. Each record must have _key field."}&lt;/P&gt;

&lt;P&gt;We follow the search example in the same page and run from the search page&lt;BR /&gt;
| inputlookup ip_intel | search ip=one_ip_address | eval item_key=_key&lt;BR /&gt;
And it works. Here one_ip_address is the same ip as the command above. We can also use Splunk SDK to execute the above search and get the correct result.&lt;/P&gt;

&lt;P&gt;Did we do something wrong with the curl command?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364566#M66398</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2020-09-29T18:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364567#M66399</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;

&lt;P&gt;I just tried your example curl and this one doesn't work but&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8094/services/data/threat_intel/item/ip_intel" target="test_blank"&gt;https://localhost:8094/services/data/threat_intel/item/ip_intel&lt;/A&gt; -d item='{"ip":58.64.179.144}' -G -X GET
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the second one, with the ip between double quotes work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8094/services/data/threat_intel/item/ip_intel" target="test_blank"&gt;https://localhost:8094/services/data/threat_intel/item/ip_intel&lt;/A&gt; -d item='{"ip":"58.64.179.144"}' -G -X GET
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you try it please?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 07:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364567#M66399</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-20T07:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364568#M66400</link>
      <description>&lt;P&gt;Thanks for your reply. &lt;BR /&gt;
Sorry about my typo. I actually tried with double quotes. &lt;/P&gt;

&lt;P&gt;curl -k -u admin:pass  &lt;A href="https://localhost:8089/services/data/threat_intel/item/ip_intel"&gt;https://localhost:8089/services/data/threat_intel/item/ip_intel&lt;/A&gt;  -d item='{"ip":"58.64.179.144"}'  -G -X  GET&lt;/P&gt;

&lt;P&gt;Just verified again, and still get the same error:&lt;BR /&gt;
{"message": "Found an invalid record in item list. Each record must have _key field.", "status": false}&lt;/P&gt;

&lt;P&gt;I am using Splunk Enterprise 6.6.1 and Splunk ES 4.7.2.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 15:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364568#M66400</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2018-03-20T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364569#M66401</link>
      <description>&lt;P&gt;Just one more information. We did not add any ip_intel to the collections. Those ip_intel must be the same as the initial installation of Splunk ES. &lt;/P&gt;

&lt;P&gt;Also a search from the search page of Splunk ES works fine. This should not be caused by a collapsed ip_intel collection. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364569#M66401</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2020-09-29T18:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364570#M66402</link>
      <description>&lt;P&gt;Can you try the curl like this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/ES/5.0.0/API/ThreatIntelligenceAPIreference#.2Fservices.2Fdata.2Fthreat_intel.2Fitem.2F.7Bthreat_intel_collection.7D.2F.7Bitem_key.7D"&gt;http://docs.splunk.com/Documentation/ES/5.0.0/API/ThreatIntelligenceAPIreference#.2Fservices.2Fdata.2Fthreat_intel.2Fitem.2F.7Bthreat_intel_collection.7D.2F.7Bitem_key.7D&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme &lt;A href="https://localhost:8089/services/data/threat_intel/item/ip_intel/fireeye:stix-b7b16e67-4292-46a3-ba64-60c1a491723d:fireeye:observable-00375905-04b4-4255-b453-2a5875c20b6d" target="test_blank"&gt;https://localhost:8089/services/data/threat_intel/item/ip_intel/fireeye:stix-b7b16e67-4292-46a3-ba64-60c1a491723d:fireeye:observable-00375905-04b4-4255-b453-2a5875c20b6d&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Mar 2018 15:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364570#M66402</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-20T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364571#M66403</link>
      <description>&lt;P&gt;This one works fine.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:58:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364571#M66403</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2018-03-21T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364572#M66404</link>
      <description>&lt;P&gt;If the answer suits your needs, accept or upvote please.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364572#M66404</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-21T18:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364573#M66405</link>
      <description>&lt;P&gt;Unfortunately this is not what we need. We want to query whether an IP address is in the ip_intel collection. This curl command returns the item with the key. We want the item that match a given ip address.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364573#M66405</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2018-03-21T18:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use curl to get ip_intel information from Splunk ES</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364574#M66406</link>
      <description>&lt;P&gt;Found this one:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/555780/splunk-enterprise-security-where-do-i-specify-key.html" target="_blank"&gt;https://answers.splunk.com/answers/555780/splunk-enterprise-security-where-do-i-specify-key.html&lt;/A&gt;&lt;BR /&gt;
Seems to be a bug in 4.7.2, which is the one I am using now.&lt;/P&gt;

&lt;P&gt;The alternative way is to use the Splunk SDK to run a search:&lt;BR /&gt;
search | inputlookup ip_intel | search ip="58.64.179.144" | eval item_key = _key&lt;BR /&gt;
This will give you the key:&lt;BR /&gt;
fireeye:stix-b7b16e67-4292-46a3-ba64-60c1a491723d:fireeye:observable-00375905-04b4-4255-b453-2a5875c20b6d&lt;/P&gt;

&lt;P&gt;Then you can use the url given by tiagofbmm to fetch information or to delete.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:37:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Use-curl-to-get-ip-intel-information-from-Splunk-ES/m-p/364574#M66406</guid>
      <dc:creator>ibmresilient</dc:creator>
      <dc:date>2020-09-29T18:37:10Z</dc:date>
    </item>
  </channel>
</rss>

