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: 
LISpeedyG
Contributor
Contributor

Trying to automate Telend API Tester

Hi,

I'm having issues using TOS to get the same JSON response to a Post query on API Tester.  Below is a working example of a query that works.  However, I cannot seem to find a way to make it work using tRestClient in TOS, i.e., I can't seem to find where all the needed variables are hidden.

 

Can someone here please point me in a relevant direction?  Thanks.

 

image.png

 

     

Labels (3)
11 Replies
LISpeedyG
Contributor
Contributor
Author

Thank You so much.  It now works.

 

I have another question:

1.  What is the best way to recursively increment the dates in the JSON file, i.e., use variables vs dates and increment the variables?

2.  Which component is best to use to parse the returning JSON and append the resulting data into a SQL table?

 

Thanks again for the EXCELLENT help.

Anonymous
Not applicable

With regard to the date question, this code will give you an idea. Paste it into a tJava and run it to see how it works.....

String strDate = "2014-08-07T04:18:21.000-07:00";

Date date = routines.TalendDate.parseDateInUTC("yyyy-MM-dd'T'HH:mm:ss.SSSX", strDate);


for(int i=0; i<100; i++){
	date = routines.TalendDate.addDate(date, 1, "dd");
	System.out.println(routines.TalendDate.formatDateInUTC("yyyy-MM-dd HH:mm:ssXXX", date));
}

The best component for extracting data from a JSON String is the tExtractJSONFields.