<?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: Raw data and count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605028#M210420</link>
    <description>&lt;P&gt;Assuming your apis are preceded by POST, try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "POST (?&amp;lt;api&amp;gt;\S+)"
| stats count by api&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 08 Jul 2022 21:31:29 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-07-08T21:31:29Z</dc:date>
    <item>
      <title>How to calculate Raw data for API endpoints and count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605024#M210418</link>
      <description>&lt;P&gt;I don't have a ton of experience with Splunk yet but I've been asked to find API endpoints (which appear to be in our raw data) and see how often their being used.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example Events:&lt;/P&gt;
&lt;P&gt;| 2022-07-08 05:59:06 21.30.2.80 POST /api/transact/credit/sale 5051 - 571.232.505.62 okhttp/3.18.9&lt;/P&gt;
&lt;P&gt;| 2022-07-08 05:02:01 22.35.3.79 POST /api/transact/device 6062 - 641.141.323.82 okhttp/2.15.3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to end up with is the api and a count:&lt;/P&gt;
&lt;P&gt;/api/transact/credit/sale&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3,475&lt;/P&gt;
&lt;P&gt;/api/transact/device&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 275&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible?&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 16:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605024#M210418</guid>
      <dc:creator>mcscjlf</dc:creator>
      <dc:date>2022-07-11T16:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Raw data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605028#M210420</link>
      <description>&lt;P&gt;Assuming your apis are preceded by POST, try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "POST (?&amp;lt;api&amp;gt;\S+)"
| stats count by api&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Jul 2022 21:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605028#M210420</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-08T21:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Raw data for API endpoints and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605055#M210428</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247555"&gt;@mcscjlf&lt;/a&gt;&amp;nbsp;- Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\s+(?&amp;lt;ip&amp;gt;\d+\.\d+\.\d+\.\d+\s+)(?&amp;lt;http_method&amp;gt;\w+)\s+(?&amp;lt;endpoint&amp;gt;\S+)"
| stats count by endpoint&lt;/LI-CODE&gt;&lt;P&gt;* I've extracted general fields here - IP, http_method, and endpoint with regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 14:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605055#M210428</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-07-09T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Raw data for API endpoints and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605169#M210458</link>
      <description>&lt;P&gt;This worked perfectly, thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 15:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Raw-data-for-API-endpoints-and-count/m-p/605169#M210458</guid>
      <dc:creator>mcscjlf</dc:creator>
      <dc:date>2022-07-11T15:26:25Z</dc:date>
    </item>
  </channel>
</rss>

