Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
john_wilson
Contributor II
Contributor II

REST API Connector - Multi-table

I've just started using the REST API connector - which is a great tool.

I am connecting directly to an instance of ServiceNow, and the specified URL is table dependant and wondered if there is a way of 'parameterising' the URL in the connection so that I don't have to create a new connection in Sense for each new table?

https://(instance).service-now.com/api/now/table/tablename

1 Solution

Accepted Solutions
chancekbarkley
Partner
Partner

John,

Look into the "With Connection" keyword as documented in Qlik Help. This allows you to override the base URL.

You may be able to define a control table with the list of table URLs or table names and pass that value as a parameter within a loop. I've sometimes found that if dollar sign expansion with $() does not work, ${} with brackets will.

I tried this unsuccessfully with another REST API, but that was only because there was a randomly generated parameter per table that I could not statically define in my control table/loop, otherwise the method seemed to work as expected. Perhaps ServiceNow works differently and you won't have this issue.

HTH,

Chance

View solution in original post

6 Replies
chancekbarkley
Partner
Partner

John,

Look into the "With Connection" keyword as documented in Qlik Help. This allows you to override the base URL.

You may be able to define a control table with the list of table URLs or table names and pass that value as a parameter within a loop. I've sometimes found that if dollar sign expansion with $() does not work, ${} with brackets will.

I tried this unsuccessfully with another REST API, but that was only because there was a randomly generated parameter per table that I could not statically define in my control table/loop, otherwise the method seemed to work as expected. Perhaps ServiceNow works differently and you won't have this issue.

HTH,

Chance

View solution in original post

john_wilson
Contributor II
Contributor II
Author

Thanks for the response Chance - I'd not heard of that capacity before and certainly looks to be what I need

** Update ** works perfectly, nice one

I did it passing in some limit parameters but I'm sure you could add that to variable if required or a peek if you had a list of tables to spit through a loop.

devvratparashar
Contributor II
Contributor II

Hello John,

I am also trying to connect service now with rest api connector  but I am not able to fetch all the tables & I do not want to create separate connections for each tables , can you please let me know how you are doing this ?

It would be really helpful , if you share the sample code .

I appreciate your help. Thanks in advance .

Ilhui
Contributor II
Contributor II

Did you solve it? 

I'm in the same situation and looking for a solution.

ilhuicahua
Contributor
Contributor

@chancekbarkley , how do I define a control table?

I'm in the same exact situation but I don't  know what are you referring to a control table.

Could you or someone else elaborate a little more on the solution?

Ilhui
Contributor II
Contributor II

@john_wilson could you explain a little bit how did you do it?

I'm confused how to do what you posted.