<?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: Combining two rest services in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659907#M11196</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261264"&gt;@ahhloy&lt;/a&gt;&amp;nbsp;- The &lt;STRONG&gt;append&lt;/STRONG&gt; command does not combine the results, it generates two different results and append. To combine it you need to use the &lt;STRONG&gt;stats&lt;/STRONG&gt; command after append. See the last line in the answer from&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 05:28:10 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2023-10-06T05:28:10Z</dc:date>
    <item>
      <title>How to combine two rest services?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/620983#M10844</link>
      <description>&lt;P&gt;Hi wonderful people.&lt;/P&gt;
&lt;P&gt;I wanted to know if we can combine two services in splunk to get an output&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| rest /services/authentication/users splunk_server=local&amp;nbsp;&lt;BR /&gt;and&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| rest /services/admin/SAML-groups splunk_server=local&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;how can I combine the above two to get the results in one query&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 07:40:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/620983#M10844</guid>
      <dc:creator>pkolhatk</dc:creator>
      <dc:date>2022-11-16T07:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two rest services</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/620986#M10845</link>
      <description>&lt;P&gt;It's not possible to create a single rest command that performs both actions.&amp;nbsp; You can, however, use the append command to combine the results of both commands then use stats to group them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest splunk_server=local /services/admin/SAML-groups
| fields title roles 
| rename title as group
| append [ | rest splunk_server=local /services/admin/SAML-user-role-map
  | fields title roles 
  | rename title as user ]
| stats values(*) as * by roles&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Nov 2022 01:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/620986#M10845</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-16T01:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two rest services</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659898#M11195</link>
      <description>&lt;P&gt;Hi everyone, I tried combining two REST command by using append. However it does not work.&lt;/P&gt;&lt;P&gt;The first rest command , I would need to get info on who is the Search Head captain, and the 2nd rest command I would need to get the bundle replication file size from the search head captain to display the bundle size. Hope some one can assist. Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rest splunk_server=local /services/shcluster/captain/info&lt;BR /&gt;| fields Captain&lt;BR /&gt;| rename label as Captain&lt;BR /&gt;| append [ rest splunk_server=Captain /services/search/distributed/bundle-replication-files ]&lt;BR /&gt;| eval timestamp=strftime(timestamp,"%m/%d/%y %H:%M:%S")&lt;BR /&gt;| eval size=size/1024/1024/1024&lt;BR /&gt;| table filename timestamp size&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 03:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659898#M11195</guid>
      <dc:creator>ahhloy</dc:creator>
      <dc:date>2023-10-06T03:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two rest services</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659907#M11196</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261264"&gt;@ahhloy&lt;/a&gt;&amp;nbsp;- The &lt;STRONG&gt;append&lt;/STRONG&gt; command does not combine the results, it generates two different results and append. To combine it you need to use the &lt;STRONG&gt;stats&lt;/STRONG&gt; command after append. See the last line in the answer from&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 05:28:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659907#M11196</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-10-06T05:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two rest services</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659916#M11197</link>
      <description>&lt;P&gt;Another thing - if you want to find which server is captain to dynamically decide to which server you should send the next rest call, you can't just say splunk_server=Captain. That would be looking for a server called Captain which you most probably don't have.&lt;/P&gt;&lt;P&gt;You need to use one of the two possible techniques here - map command or subsearch.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 06:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659916#M11197</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-06T06:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two rest services</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659944#M11198</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;thank you for the advise.. Not sure if the use of stats command is correct.&lt;/P&gt;&lt;P&gt;I would need the append output to show the search head captain, bundle size and file name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rest /services/shcluster/status splunk_server=local&lt;BR /&gt;| fields captain.label&lt;BR /&gt;| append [ | rest splunk_server=local /services/search/distributed/bundle-replication-files&lt;BR /&gt;| fields captain.label size filename&lt;BR /&gt;| eval timestamp=strftime(timestamp,"%m/%d/%y %H:%M:%S")&lt;BR /&gt;| eval size=size/1024/1024/1024&lt;BR /&gt;| table filename timestamp size ]&lt;BR /&gt;| rest /services/shcluster/status splunk_server=local&lt;BR /&gt;| fields captain.label&lt;BR /&gt;| append [ | rest splunk_server=local /services/search/distributed/bundle-replication-files&lt;BR /&gt;| fields captain.label size filename&lt;BR /&gt;| eval timestamp=strftime(timestamp,"%m/%d/%y %H:%M:%S")&lt;BR /&gt;| eval size=size/1024/1024/1024&lt;BR /&gt;| table filename timestamp size ]&lt;BR /&gt;| stats latest(_time) as latest_time by captain.label size&amp;nbsp;filename | convert ctime(latest_time)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 08:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-combine-two-rest-services/m-p/659944#M11198</guid>
      <dc:creator>ahhloy</dc:creator>
      <dc:date>2023-10-06T08:23:03Z</dc:date>
    </item>
  </channel>
</rss>

