<?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: Need help in ignoring the ID of API endpoints in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609237#M211853</link>
    <description>&lt;P&gt;Something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=RequestPath "^(?&amp;lt;endpoint&amp;gt;.+/)[^/]+$"
| stats count by endpoint&lt;/LI-CODE&gt;&lt;P&gt;or, more "formal"ly,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval RequestPath = split(RequestPath, "/")
| eval endpoint = mvjoin(mvindex(RequestPath, 0, mvcount(RequestPath) - 1), "/")
| stats count by endpoint&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 03:42:53 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-08-12T03:42:53Z</dc:date>
    <item>
      <title>How do I extract only endpoints and ignore the ID of API endpoints?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609122#M211803</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a bunch of failure events of different api endpoints. The field is called RequestPath and some examples are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/v1/locations/45BH-JGN&lt;/LI&gt;
&lt;LI&gt;/v1/exceptions/ABS/12&lt;/LI&gt;
&lt;LI&gt;/v1/exceptions/ODD/13&lt;/LI&gt;
&lt;LI&gt;/v2/absence/100&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Basically, I am trying to extract only the endpoints without the ids, so that I can get a count of which endpoints are failing, example&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/v1/locations/ --- 1 failure&lt;/LI&gt;
&lt;LI&gt;/v1/exceptions/ABS/&amp;nbsp; ----- 4 failures&lt;/LI&gt;
&lt;LI&gt;/v1/exceptions/ODD/ ---- 10 failures , etc.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;How can I do the same?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 14:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609122#M211803</guid>
      <dc:creator>labaningombam</dc:creator>
      <dc:date>2022-08-11T14:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609128#M211806</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex field=RequestPath "(?&amp;lt;location&amp;gt;.*/)"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Aug 2022 07:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609128#M211806</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-11T07:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609132#M211808</link>
      <description>&lt;P&gt;Actually,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my request path in log as&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/v1/locations/45BH-JGN&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract "/v1/locations/" from it. Similarly I have endpoint&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/v1/exceptions/ABS/12&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need to extract only "/v1/exceptions/ABS/"&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to ignore the last string which comes after "/" and get the same.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 09:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609132#M211808</guid>
      <dc:creator>labaningombam</dc:creator>
      <dc:date>2022-08-11T09:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609133#M211809</link>
      <description>&lt;P&gt;Actually,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my request path in log as&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/v1/locations/45BH-JGN&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract "/v1/locations/" from it. Similarly I have endpoint&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/v1/exceptions/ABS/12&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need to extract only "/v1/exceptions/ABS/"&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to ignore the last string which comes after "/" and get the same.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 09:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609133#M211809</guid>
      <dc:creator>labaningombam</dc:creator>
      <dc:date>2022-08-11T09:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609155#M211819</link>
      <description>&lt;P&gt;So when you said you had a field called RequestPath, you meant you don't have a field called RequestPath?&lt;/P&gt;&lt;P&gt;Instead you meant, you have a raw event which you need to extract a field called RequestPath from, and then extract the first part (up to the last /)?&lt;/P&gt;&lt;P&gt;Perhaps you could share some of your actual events and identify which fields have already been extracted?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 12:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609155#M211819</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-11T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609168#M211824</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have a field called RequestPath. Here are 3 different event logs.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Properties: { [-]
Host:
MachineName:
RequestId:
RequestPath: /v1/locations/41b2ee1b-145es
StatusCode: 404
}&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Properties: { [-]
Host:
MachineName:
RequestId:
RequestPath: /v1/exceptions/ODD/123
StatusCode: 404
}&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Properties: { [-]
Host:
MachineName:
RequestId:
RequestPath: /v2/timebuckets/A4GH-A
StatusCode: 404
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My need is to have a count of how many errors are there for each request path without the ID(which is the last string in the endpoint after '/')&lt;/P&gt;&lt;P&gt;So&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/v1/locations/&amp;nbsp; - 1 Failure&lt;/LI&gt;&lt;LI&gt;/v1/exceptions/ODD/ - 1 Failure&lt;/LI&gt;&lt;LI&gt;/v2/timebuckets/ - 1 Failure&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 12:43:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609168#M211824</guid>
      <dc:creator>labaningombam</dc:creator>
      <dc:date>2022-08-11T12:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609177#M211826</link>
      <description>&lt;P&gt;Thanks. It looks like your events are partially JSON. Have you extract the RequestPath field already, or do you need some guidance on that? (If it has been done already, it might have a different name "...Properties.RequestPath&amp;nbsp; for example.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 13:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609177#M211826</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-11T13:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in ignoring the ID of API endpoints</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609237#M211853</link>
      <description>&lt;P&gt;Something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=RequestPath "^(?&amp;lt;endpoint&amp;gt;.+/)[^/]+$"
| stats count by endpoint&lt;/LI-CODE&gt;&lt;P&gt;or, more "formal"ly,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval RequestPath = split(RequestPath, "/")
| eval endpoint = mvjoin(mvindex(RequestPath, 0, mvcount(RequestPath) - 1), "/")
| stats count by endpoint&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 03:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-only-endpoints-and-ignore-the-ID-of-API/m-p/609237#M211853</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-12T03:42:53Z</dc:date>
    </item>
  </channel>
</rss>

