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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to loop tRestClient component if my Response from API is like this:

Hi all,

 

I am preparing a Talend job which will fetch data from web services using API. The structure of the web service is like this: 

  • Parent Folder ( We have the URL for parent folder)  Which contains Sub-Folders and inside Sub-Folders we have other Sub-Folders/ Documents.

Steps which we need to implement: 

PS: I have changed  the URLs ( As it is confidential) ( Given some random URLs for examples)

Step 1 : After hitting the Parent Folder URL using tRestClient Component, we will get a response in JSON format. Which includes information like:

  • {
  • "Name": "FOLDER_NAME"
  • "CreatedDate": "2017-02-10T15:24:44.87Z",
  • "CreatedBy": "xyz@pqr.com",
  •  "UpdatedDate": "2019-01-18T19:34:26.723Z",
  •  "UpdatedBy": "shgqc@fqwefe.com",


To see the whole post, download it here
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi
How to get the sub_sub_folder? Are they all listed in the response of step1 or need to redo step1 to get the sub_sub_folder for each sub_folder?

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong, Thanks for you concern. To get the details of sub_sub_folder we need to hit the sub_folder URL. So you can say that we need to redo the step 1. But in step 1 we are passing parent folder link which is static. So we cannot change it in future processing, we need to hit the URL of sub_folder to get the details of Sub_sub_folder.

Regards
Shahbaz

Anonymous
Not applicable
Author

We will not get sub_sub_folder details from step 1. From step 1 we are only getting sub_folder details.
After going inside sub_folder we will fetch sub_sub_folder URL (i.e., URL which after hitting gives sub_sub_folder details in response) .
So we have to proceed like this. 

Please ask me if any doubts is still there.

 

Thank you

Shahbaz

Anonymous
Not applicable
Author

Shong, You can add/subtract Steps according to your preference. There is no hard & fast rule for that. The overall work is to go the end of all folders and hit the Document URL and from the response we get, Hit the HistoryItem URL. Whatever response we get from there we just have to push it into DB.
I hope it is clear now.
Anonymous
Not applicable
Author

Hi Shong,
I am waiting for your reply.
Thanks & Regards
Shahbaz