tRESTClient OAuth 1.0 parameter help

Highlighted
Five Stars

tRESTClient OAuth 1.0 parameter help

Hello.  My first post, so I apologize if it is not the correct area to pose this question.  The scenario i have is that I am making a tRESTClient call.  I have a java routine building the Authorization header and it is passed to the tRESTClient as a context variable.  If I call the endpoint with the URL, Relative Path and Authorization header, the call works fine, and I get the default number (100) of records.  If I try to add any combination of paging parameters, the call fails with a "HTTP 401 Unauthorized" error, even a parameter as simple as "limit" and a value of "10".   I guess the first thing I would like to know is if there is some sort of component variable that will show me the entire call that includes the header, URL and parameters?  I have samples of cURL from the swagger (which works fine), and it is just tacked onto the end of the call:  ......r/v1p1/orgs?limit=10'.  Any suggestions are appreciated.  thx.  


Accepted Solutions
Five Stars

Re: tRESTClient OAuth 1.0 parameter help

First, thanks for replying. The calls are all GETs.  This is an API that is populated from a student management system.  All of the endpoints return data from the swagger, from cURL and from my Talend calls.  Adding pagination to the swagger and cURL returns data correctly.  It is when I try to add pagination to the Talend job, that is fails.  I can print out the context variable that holds the URL, but that does not show me the entire call with the headers and the parameters.  It just shows the URL, which is correct.  Actually, if I didn't need more than just the first 100 students, I would be all set with the call the way it is now.  I have a couple of meetings, but i will post some screen shots as soon as I get a chance.  

Five Stars

Re: tRESTClient OAuth 1.0 parameter help

We found our problem.  The pagination parameters needed to be included in the token request - not in the tRestClient component, but there was a bug OAuth Library signedrequest4 where 

SignedRequestBaseImpl.getSignature() disregard the query string.  Hope this can help someone in the future.


All Replies
Community Manager

Re: tRESTClient OAuth 1.0 parameter help

You need to give us more information I'm afraid. What call are you making (have you tested your context variable by printing it out)? What calls do you know work? Does the web service have any instructions on how to use it? Can you show us a screenshot of your configuration?

 

Web services are notoriously complicated sometimes even when you have all of the information.

Five Stars

Re: tRESTClient OAuth 1.0 parameter help

First, thanks for replying. The calls are all GETs.  This is an API that is populated from a student management system.  All of the endpoints return data from the swagger, from cURL and from my Talend calls.  Adding pagination to the swagger and cURL returns data correctly.  It is when I try to add pagination to the Talend job, that is fails.  I can print out the context variable that holds the URL, but that does not show me the entire call with the headers and the parameters.  It just shows the URL, which is correct.  Actually, if I didn't need more than just the first 100 students, I would be all set with the call the way it is now.  I have a couple of meetings, but i will post some screen shots as soon as I get a chance.  

Five Stars

Re: tRESTClient OAuth 1.0 parameter help

We found our problem.  The pagination parameters needed to be included in the token request - not in the tRestClient component, but there was a bug OAuth Library signedrequest4 where 

SignedRequestBaseImpl.getSignature() disregard the query string.  Hope this can help someone in the future.

Community Manager

Re: tRESTClient OAuth 1.0 parameter help

Sorry I didn't get back to you, I must have missed the notification of your response to my message. I tend to get a fair few notifications here. Anyway, glad you got it sorted.  

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download