Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
himanshup
Contributor III
Contributor III

tFlowToIterate to tRESTClient

I have two columns coming out of tFilterRow, then connects to tFlowToIterate. I need to use the values in one of the columns (username) in tRESTClient component.

Is that possible to do?

himanshup_0-1732664651056.pnghimanshup_1-1732664665617.png

Thank you in advance

Labels (2)
5 Replies
Dave_Simo
Contributor III
Contributor III

Hello,

To call the value of the username in your api call you must do ((String)globalMap.get("row1.username"))
himanshup
Contributor III
Contributor III
Author

Thank you Dave_Simo,

I update the job, now getting this error:

ERROR] 08:36:58 org.apache.cxf.jaxrs.utils.JAXRSUtils- No message body reader has been found for class org.dom4j.Document, ContentType: text/html;charset=utf-8

Exception in component tRESTClient_1

Dave_Simo
Contributor III
Contributor III

Hello,

In your case since it is a POST, you must put your json in a tFixedFlowInput a bit like in the design below

Dave_Simo_0-1732726465062.png

1) 

Dave_Simo_1-1732726591851.png

 

2) 

Dave_Simo_2-1732726651951.pngDave_Simo_3-1732726666349.png

3) a tWarn to catch the error

Dave_Simo_4-1732726817333.png

 

Best Regards,

 

himanshup
Contributor III
Contributor III
Author

Thank you Dave_Simo,

My API call does not have a JSON body. It is of this format (works in postman):
https://xxxyyyzzz.com/sharing/rest/community/users/<username>/disable?token=<token value>

The username is the variable that I need to feed into the API call. In my case, username is the output from tMap component, that I am feeding into tFlowToItrerate component to handle multiple rows of username.

I am not sure I am using the correct components or logic as I am fairy new to this.

 

 

 

Dave_Simo
Contributor III
Contributor III

Hello,


If the call works in Postman it should work in the tRestClient, you should put the same header values ​​as in Postman.

Try adding this in the header in advanced settings

Dave_Simo_1-1732734121676.png

 

Best Rgards