Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
lgati
Contributor II
Contributor II

API call to Cherwell endpoint - contains form body

Hello all,

 

I am wondering if anyone has experience calling Cherwell APIs to pull data using Talend?

I have been able to call the APIs successfully with Postman, however, I've been struggling to implement this using Talend. Weird things about this API, it doesn't use Auth, but rather it accepts a body in "x-www-form-urlencoded", after some Googling, I have tried tRest and tRestClient both without success.

tRest -> You can put a body in the component, I have done that but the error from the API points at a parameter in the body not present, but it is present in the HTTP Body section as a string separated with spaces. tRest > tLogRow.

tRestClient -> I used a tJavaRow component to create the body and pass it to the string portion of the tRestClient, again I get the same error that a parameter is missing in the body. tJava (dummy holder) > tJavaRow > tRestClient > tLogRow.

 

Is the body supposed to be passed already encoded to Talend? or should I put commas, semi colons between Body parameters?

Any help is appreciated.

 

Labels (2)
1 Solution

Accepted Solutions
lgati
Contributor II
Contributor II
Author

I got it to work with both tRest (post) and tRestClient, using a tJavaRow in front of it with the body in a string.

 

With the help of support I was able to solve the problem.

The body has to be in this format

"grant_type=password&client_id=123&..."

 

I got confused since Postman showed it as

grant_type0683p000009MAB6.pngassword
client_id:123

...

View solution in original post

1 Reply
lgati
Contributor II
Contributor II
Author

I got it to work with both tRest (post) and tRestClient, using a tJavaRow in front of it with the body in a string.

 

With the help of support I was able to solve the problem.

The body has to be in this format

"grant_type=password&client_id=123&..."

 

I got confused since Postman showed it as

grant_type0683p000009MAB6.pngassword
client_id:123

...