Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Making a ReST API call with authorization header

$
0
0
Hi all,
I'm trying to make an API call to a service which requires an authorization header, but having a time with figuring it out. Perhaps syntax?
I'm on version 6.1 of PDI community edition.

My transformation is simple:
  1. I generate a row which provides the url, my parameter (-k) and my authorization header
  2. The REST Client step takes the URL from the submitted rows, and uses the headers and parameters passed in as well

Screen Shot 2016-12-19 at 2.55.48 PM.png

I'm not doing anything with the XML output just yet. The result of this call is a 401, so it's letting me know I'm unauthorized.
I've attached my work sample, having swapped out the actual url as authentications. I did validate that all of these were correct (opened the url in a browser), verified that my username and password were properly translated. And I was able to make a curl call with this for the correct response.

So how do I properly use the authentication headers? I've tried
  • As a parameter
  • As a header
  • with and without quotes
  • Including -H "Authorization: basic <username:password>"

But still not getting through.

Thanks for your help and clarifying questions!
Attached Images
Attached Files

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>