Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to build a REST service to get customer information in 2 different ways

Hi all,

 

I try to build a REST service to give the possibility to retrieve customer information in 2 ways with a single URI : by the customer id (integer) or by customer code (String). My first idea is to define a single endpoint as follow 0683p000009Lqzz.png0683p000009LqtU.png

But I don't know if I'm on the right way because from now I didn't find the means to divide my job depending on the given information code or id.

 

Many thanks for your help.

 

Best Regards

Labels (1)
  • Other

3 Replies
Vinlogs
Creator
Creator

I am new to this aswell, I did some mapping of data gathered from a rest api using trestclient component -> tmap -> tfileoutputXML and then prepare a metada file out of this xml file generated and then point the required coloumns using a tmap and send the data to an excel file. Are you trying to do anything of this sort? please ignore if I am not answering what you are looking for. Thanks.


trest_api_client.JPG
Anonymous
Not applicable
Author

Basically you need to set up two Output Flows. One for each. You are going to have to process the inputs differently anyway, so this actually makes it far more logical than trying to apply optional logic within one Output Flow.

 

You might like to take a look here (https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/53ZgjRgRIZBxKLOrSTD_CA) for some more details on how you can use the tRestRquest.

Anonymous
Not applicable
Author

Hi,

 

Thanks to both of you. I'm gonna take a look and check each track you gave.

 

Best regards,

 

Thomas