<?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: How to call a REST API using POST method to get data using Splunk add-on builder? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-call-a-REST-API-using-POST-method-to-get-data-using/m-p/612397#M77591</link>
    <description>&lt;P&gt;I know this is an old post, but posting an answer in case others need it.&lt;/P&gt;&lt;P&gt;To translate the body { "key1":"value1", "key2": "value2", ...}&amp;nbsp;&lt;BR /&gt;The AOB request body will be :&lt;BR /&gt;&lt;BR /&gt;Name: key1&amp;nbsp; &amp;nbsp; Value: value1&lt;BR /&gt;Name: key2&amp;nbsp; &amp;nbsp; Value: value2&amp;nbsp;&lt;BR /&gt;Name: .....&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Value: .......&lt;BR /&gt;&lt;BR /&gt;Also, I see you're using Basic Auth. I'd suggest using Global Account in Add-On Setup Parameters. It should have a checkbox for Basic Auth.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 10:39:38 GMT</pubDate>
    <dc:creator>andrew_nelson</dc:creator>
    <dc:date>2022-09-08T10:39:38Z</dc:date>
    <item>
      <title>How to call a REST API using POST method to get data using Splunk add-on builder?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-call-a-REST-API-using-POST-method-to-get-data-using/m-p/604825#M77133</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to get data in using Splunk rest API feature of Splunk add-on builder, however I am not able to get the results using POST method.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know what is the correct syntax to pass JSON query in REST request body?&lt;/P&gt;
&lt;P&gt;I tried using "data","payload","raw" as Name and in Value I have put the JSON query but it's not working.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I keep getting&amp;nbsp;The response status=500 for request ....&lt;/P&gt;
&lt;P&gt;PS: I have used postman to validate my request body and it works fine and return results. however, I am not able to do that using Splunk rest API. Not sure if I am missing something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-07-07 at 1.16.50 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20447iA5A387402F55F5B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-07-07 at 1.16.50 PM.png" alt="Screen Shot 2022-07-07 at 1.16.50 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 17:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-call-a-REST-API-using-POST-method-to-get-data-using/m-p/604825#M77133</guid>
      <dc:creator>mayurrbc</dc:creator>
      <dc:date>2022-07-07T17:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a REST API using POST method to get data using Splunk add-on builder?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-call-a-REST-API-using-POST-method-to-get-data-using/m-p/612397#M77591</link>
      <description>&lt;P&gt;I know this is an old post, but posting an answer in case others need it.&lt;/P&gt;&lt;P&gt;To translate the body { "key1":"value1", "key2": "value2", ...}&amp;nbsp;&lt;BR /&gt;The AOB request body will be :&lt;BR /&gt;&lt;BR /&gt;Name: key1&amp;nbsp; &amp;nbsp; Value: value1&lt;BR /&gt;Name: key2&amp;nbsp; &amp;nbsp; Value: value2&amp;nbsp;&lt;BR /&gt;Name: .....&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Value: .......&lt;BR /&gt;&lt;BR /&gt;Also, I see you're using Basic Auth. I'd suggest using Global Account in Add-On Setup Parameters. It should have a checkbox for Basic Auth.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 10:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-call-a-REST-API-using-POST-method-to-get-data-using/m-p/612397#M77591</guid>
      <dc:creator>andrew_nelson</dc:creator>
      <dc:date>2022-09-08T10:39:38Z</dc:date>
    </item>
  </channel>
</rss>

