Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
There is an API available for me to get daily data for a given date. I would like to run this each day after the end of the day to append it into the existing data. Below is the link I will use with the parameters.
https://api.xxx.com/{channel_id}/results?access_key={project access_key}&date={YYYYMMDD}
So, should I use rest api to do this on Qlik sense cloud? How can I dynamically set it up in the script and what is the best methodology to append data everyday?
Thank you!
As I understand the question, you're after passing a variable into a URL in a REST Connection which accepts a param of a date.
With that understanding, I believe the WITH CONNECTION capability of the REST Connector is what you're after. With your example this would be done like so:
// Parse current date
vDate = Date(Now(), 'YYYYMMDD');
LIB CONNECT TO 'My ConnectionName';
RestConnectorMasterTable:
SQL SELECT
...
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
URL "https://api.xxx.com/{channel_id}/results?access_key={project access_key}&date=$(vDate)"
);
Have you checked out the following Help Doc, believe it may put you on the right track:
Regards,
Brett
As I understand the question, you're after passing a variable into a URL in a REST Connection which accepts a param of a date.
With that understanding, I believe the WITH CONNECTION capability of the REST Connector is what you're after. With your example this would be done like so:
// Parse current date
vDate = Date(Now(), 'YYYYMMDD');
LIB CONNECT TO 'My ConnectionName';
RestConnectorMasterTable:
SQL SELECT
...
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
URL "https://api.xxx.com/{channel_id}/results?access_key={project access_key}&date=$(vDate)"
);