<?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 WebTools app - How to make the GET curl script work with Header authentication in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466112#M57239</link>
    <description>&lt;P&gt;I was testing the curl script in WebTools app in Splunk and it gives me an error. Could you let me know, what could be the issue.&lt;/P&gt;

&lt;P&gt;The actual curl script that works is:&lt;/P&gt;

&lt;P&gt;curl -X GET -H 'apiKey: 232040b2-22ac-11ea-978f-2e728444444' &lt;A href="http://xxx.com/token/auth"&gt;http://xxx.com/token/auth&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Below is the translated one in webtool, which is not working, stating the header is not being passed correctly:&lt;/P&gt;

&lt;P&gt;| eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8 444444\"}"&lt;BR /&gt;
| curl method=get  &lt;A href="http://xxx.com/token/auth"&gt;http://xxx.com/token/auth&lt;/A&gt;  headerfield=header | table curl* &lt;/P&gt;

&lt;P&gt;Anything i am doing wrong here. Please suggest.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 15:36:44 GMT</pubDate>
    <dc:creator>magesh_r</dc:creator>
    <dc:date>2020-04-02T15:36:44Z</dc:date>
    <item>
      <title>WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466112#M57239</link>
      <description>&lt;P&gt;I was testing the curl script in WebTools app in Splunk and it gives me an error. Could you let me know, what could be the issue.&lt;/P&gt;

&lt;P&gt;The actual curl script that works is:&lt;/P&gt;

&lt;P&gt;curl -X GET -H 'apiKey: 232040b2-22ac-11ea-978f-2e728444444' &lt;A href="http://xxx.com/token/auth"&gt;http://xxx.com/token/auth&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Below is the translated one in webtool, which is not working, stating the header is not being passed correctly:&lt;/P&gt;

&lt;P&gt;| eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8 444444\"}"&lt;BR /&gt;
| curl method=get  &lt;A href="http://xxx.com/token/auth"&gt;http://xxx.com/token/auth&lt;/A&gt;  headerfield=header | table curl* &lt;/P&gt;

&lt;P&gt;Anything i am doing wrong here. Please suggest.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466112#M57239</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-02T15:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466113#M57240</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;

&lt;P&gt;It looks like you have a space in your apiKey i marked it with &lt;CODE&gt;*HERE*&lt;/CODE&gt; in example below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8*HERE*444444\"}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is your example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8 444444\"}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which is different than what you have with your curl test.&lt;/P&gt;

&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8444444\"}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466113#M57240</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-02T15:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466114#M57241</link>
      <description>&lt;P&gt;Thanks for your response. It was a typo on my behalf while posting my question. Sorry about that. &lt;BR /&gt;
But, there is no space in the apiKey header anywhere in the Splunk query.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466114#M57241</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-02T15:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466115#M57242</link>
      <description>&lt;P&gt;Thanks for your response. It was a typo on my end while posting this question. Sorry about that.&lt;BR /&gt;
There is NO space in the apiKey header anywhere in the splunk query. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466115#M57242</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-02T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466116#M57243</link>
      <description>&lt;P&gt;do you have logs from the API side that say what happened?&lt;/P&gt;

&lt;P&gt;if you add debug=true to the | curl command... does it give the error reason and status code in the curl* fields?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 16:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466116#M57243</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-02T16:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466117#M57244</link>
      <description>&lt;P&gt;Below is my curl command:&lt;BR /&gt;
| eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce8444444\"}"&lt;BR /&gt;
| curl method=get uri=&lt;A href="http://xxx.com/token/auth" target="_blank"&gt;http://xxx.com/token/auth&lt;/A&gt; headerfield=header debug=true| table curl*&lt;/P&gt;

&lt;P&gt;I get curl stats as 400&lt;/P&gt;

&lt;P&gt;curl message as below:&lt;/P&gt;

&lt;P&gt;{"message":"Validation errors","errors":[{"code":"INVALID_REQUEST_PARAMETER","errors":[{"code":"REQUIRED","message":"Value is required but was not provided","path":["paths","/token","get","parameters","0"]}],"in":"header","message":"Invalid parameter (apiKey): Value is required but was not provided","name":"apiKey","path":["paths","/token","get","parameters","0"]}]}&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:51:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466117#M57244</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-09-30T04:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466118#M57245</link>
      <description>&lt;P&gt;Try replacing your hyphens "-" with "%2D" &lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466118#M57245</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-02T18:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466119#M57246</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval header = "{\"apiKey\":\"232040b2%2d22ac%2d11ea%2d978f%2d2e728ce8444444\"}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466119#M57246</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-02T18:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466120#M57247</link>
      <description>&lt;P&gt;Tried it, same status and error message.&lt;BR /&gt;
Is my Splunk query correct for apiKey based authentication curl script?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 19:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466120#M57247</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-02T19:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466121#M57248</link>
      <description>&lt;P&gt;Are you using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | makeresults count=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At the beginning of your search?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 00:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466121#M57248</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-03T00:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466122#M57249</link>
      <description>&lt;P&gt;It was not there before. Added it , same error as well. Below is my final query:&lt;/P&gt;

&lt;P&gt;| makeresults count=1 &lt;BR /&gt;
| eval header = "{\"apiKey\":\"232040b2%2d22ac%2d11ea%2d978f%2d2e728ce88125\"}"&lt;BR /&gt;
| curl method=get uri=&lt;A href="http://xxx.com/token/auth"&gt;http://xxx.com/token/auth&lt;/A&gt; headerfields=header debug=true| table curl*&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 01:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466122#M57249</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-03T01:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466123#M57250</link>
      <description>&lt;P&gt;Try it with the dashes again instead of %2D&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 01:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466123#M57250</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-03T01:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466124#M57251</link>
      <description>&lt;P&gt;I tried that now and before as well. Nothing changed.&lt;BR /&gt;
Wondering whether the header is not setup properly(may be the way i am doing is not right) , as the error is saying the apiKey value is not setup properly.&lt;BR /&gt;
Do you have any example or reference by other members who have done this similar curl which using authentication:&lt;/P&gt;

&lt;P&gt;Error:&lt;BR /&gt;
{"message":"Validation errors","errors":[{"code":"INVALID_REQUEST_PARAMETER","errors":[{"code":"REQUIRED","message":"Value is required but was not provided","path":["paths","/token","get","parameters","0"]}],"in":"header","message":"Invalid parameter (apiKey): Value is required but was not provided","name":"apiKey","path":["paths","/token","get","parameters","0"]}]}&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466124#M57251</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-09-30T04:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466125#M57252</link>
      <description>&lt;P&gt;Can you try version 1.3 of the app?&lt;/P&gt;

&lt;P&gt;We changed it so it posts JSON after that version.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 10:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466125#M57252</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-03T10:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466126#M57253</link>
      <description>&lt;P&gt;We are using v1.2.6, are u asking us to downgrade to 1.2.6 to try the curl again?? Please let us know.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 19:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466126#M57253</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-08T19:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466127#M57254</link>
      <description>&lt;P&gt;We are using v1.2.6. Are you asking us to downgrade to v1.2.3 and try again the curl? Please let us know. &lt;BR /&gt;
Advanced Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 19:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466127#M57254</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-04-08T19:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466128#M57255</link>
      <description>&lt;P&gt;Yes please try 1.2.3 which was before we made changes to add json support.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 19:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466128#M57255</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-04-08T19:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: WebTools app - How to make the GET curl script work with Header authentication</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466129#M57256</link>
      <description>&lt;P&gt;Downgraded to 1.2.3 and tried the following:&lt;/P&gt;

&lt;P&gt;| eval header = "{\"apiKey\":\"232040b2-22ac-11ea-978f-2e728ce88125\"}"&lt;BR /&gt;
| curl method=get uri=&lt;A href="https://xxx.com/api/authorization/token" target="_blank"&gt;https://xxx.com/api/authorization/token&lt;/A&gt; headerfield=header| table curl*&lt;/P&gt;

&lt;P&gt;Same error still with error status 400:&lt;BR /&gt;
{"message":"Validation errors","errors":[{"code":"INVALID_REQUEST_PARAMETER","errors":[{"code":"REQUIRED","message":"Value is required but was not provided","path":["paths","/token","get","parameters"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/WebTools-app-How-to-make-the-GET-curl-script-work-with-Header/m-p/466129#M57256</guid>
      <dc:creator>magesh_r</dc:creator>
      <dc:date>2020-09-30T04:57:37Z</dc:date>
    </item>
  </channel>
</rss>

