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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pthomas
Contributor III
Contributor III

Debugging a tRest component

Based on my original post about iterating through a list; how can I see what is being used in a tRest component?

Original Post: https://community.qlik.com/t5/Design-and-Development/How-do-I-iterate-through-a-list/m-p/2509973

pthomas_0-1742302160271.png

I can pass "url" to the tRest component and save 3 files each based on the "genre" from the loop.

genre = ((String)globalMap.get("genre"))
url = ((String)globalMap.get("url"))

But I am getting an error saying the url not valid. The url that I am trying to pass in is valid and verified. In the URL column in the tRest object, here are 2 values that both fail; the 2nd makes the most sense to me. 

1)  "https://api.nytimes.com/svc/books/v3/lists/current/" + ((String)globalMap.get("genre")) + ".json?api-key=<--secret access key-->"
2)  ((String)globalMap.get("url"))

pthomas_1-1742302203053.png

 

How can I see what is being passed into and out of the tRest object? I feel that, at this point, I need to troubleshoot the url that is being rendered.

 

Labels (3)
1 Solution

Accepted Solutions
Shicong_Hong
Employee
Employee

For debugging,  you can use a tJava instead of tRest to print the value of the two string that contains context variable, and see if it outputs the expected URL.

View solution in original post

2 Replies
Shicong_Hong
Employee
Employee

For debugging,  you can use a tJava instead of tRest to print the value of the two string that contains context variable, and see if it outputs the expected URL.

pthomas
Contributor III
Contributor III
Author

Thanks, I wound up using a tMsgBox.