Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
hbuchetmann
Contributor III
Contributor III

Qlikview Server and Restful API Conenctor

Hello together,

we still have installed the Qlikview Server Version 12.10.20200 in our company.

Recently i downloaded the newest availabe Qlikview Desktop application and tried out the latest Rest API Connector.

 

I managed to load data into the qlikview application with manually reloading the skript.

But when it try to update the application automatically with the the qlikview server management console , it alwas runs into an error. If i open the application and reload skript manually it works fine.

Do i have to update our server to use the rest api connection with it?

Or is it not possible to get data from API with the management console?

Labels (1)
1 Solution

Accepted Solutions
hbuchetmann
Contributor III
Contributor III
Author

HI Brett,

 

we updated the Qlikview Server to the latest Version, now it works fine.

The Value inside $(v_Token) (the token) in the line: queryHeaders=Authorization%2$(v_Token);

is pulled correctly now.

It looks like the older Server Version handled Values inside a variable differently than the newest.

Thank you for your suggestions and help.

 

Best wishes from germany,

 

Hermann

 

View solution in original post

7 Replies
Josh_Berg_Support

Can you provide the document log that will show the error you're seeing when trying to run the reload task from the QMC?

We always recommend using the same version of Qlikview Desktop as Qlikview Server.

Thanks,
Josh

Qlik Support

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
hbuchetmann
Contributor III
Contributor III
Author

Hello Josh,

 

here is the log entry from the Qlikview Management Console:

(02.10.2019 23:26:40) Information: DistributeTask[17378563-682e-4987-b8d0-dfb166ea5414] ("Huber GmbH/Import PM/Import Aufträge PM - Test.qvw"): TryStart - Starting task. Triggered by 'ManualStartTrigger'. Id:00000001-0002-0003-0405-0607080a0b0c. ExecID:62a0e94b-8f3e-4fd2-8975-149fff289dd5

(02.10.2019 23:26:40) Information: Entering Task Execution.

(02.10.2019 23:26:40) Information: ClusterID=1

(02.10.2019 23:26:40) Information: QDSID=4d657f47-1c25-f7af-ffc5-c5f2653ae325

(02.10.2019 23:26:40) Information: TaskID=17378563-682e-4987-b8d0-dfb166ea5414

(02.10.2019 23:26:40) Information: ExecID=62a0e94b-8f3e-4fd2-8975-149fff289dd5

(02.10.2019 23:26:40) Information: MaxRunTime=06:00:00

(02.10.2019 23:26:40) Information: MachineName=...

(02.10.2019 23:26:40) Information: Task execution max attempts=1

(02.10.2019 23:26:40) Information: Task execution current attempt=1

(02.10.2019 23:26:40) Information: Task Dependencies are OK

(02.10.2019 23:26:40) Information: The task "Huber GmbH/Import PM/Import Aufträge PM - Test.qvw" is starting

(02.10.2019 23:26:40) Information: Document is marked to be Reloaded with fresh data. Initializing Reload for Distribution.

(02.10.2019 23:26:40) Information: Opening "D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw"

(02.10.2019 23:26:40) Information: Allocating new QlikView Engine. Current usage count=0 of 5 (of type non-reader).

(02.10.2019 23:26:40) Information: Max retries:5

(02.10.2019 23:26:40) Information: Attempt:01

(02.10.2019 23:26:41) Information: Opened the QlikView Engine successfully. ProcessID=10860

(02.10.2019 23:26:41) Information: Allocated QlikView Engine successfully. Current usage count=1 of 5 (of type non-reader). Ticket number=547.

(02.10.2019 23:26:41) Information: Loading document "D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw" (9.48 Mb)

(02.10.2019 23:26:42) Information: Physical FileSize=9.48 Mb. Memory Allocation Delta for this file=14.74 Mb. Available Physical Memory Before Open=12678.53 Mb. Available Physical Memory After Open=12647.58 Mb. Total Physical Memory=16383.55 Mb.

(02.10.2019 23:26:42) Information: Attempted to load the document without data.

(02.10.2019 23:26:42) Information: The document was loaded successfully.

(02.10.2019 23:26:42) Information: Document was opened successfully

(02.10.2019 23:26:42) Information: Starting reload

(02.10.2019 23:26:42) Information: The Source Document is being reloaded. DocumentPath=D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw

(02.10.2019 23:26:43) Information: Reloading.

(02.10.2019 23:26:44) Information: Reloading..

(02.10.2019 23:26:45) Information: Reloading...

(02.10.2019 23:26:46) Information: Reloading....

(02.10.2019 23:26:47) Information: Reloading.....

(02.10.2019 23:26:48) Information: Reloading......

(02.10.2019 23:26:49) Information: Reloading.......

(02.10.2019 23:26:50) Information: Reloading........

(02.10.2019 23:26:51) Information: Reloading.........

(02.10.2019 23:26:52) Information: Reloading..........

(02.10.2019 23:26:53) Information: Slow down logging. Log every <2> seconds.

(02.10.2019 23:26:53) Information: Reloading

(02.10.2019 23:26:54) Information: The Source Document reload complete. DocumentPath=D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw

(02.10.2019 23:26:54) Information: Memory Allocation Delta for this file=8.34 Mb. Available Physical Memory Before Reload=12644.63 Mb. Available Physical Memory After Reload=12620.73 Mb. Total Physical Memory=12620.73 Mb.

(02.10.2019 23:26:54) Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw.

(02.10.2019 23:26:54) Information: QlikView->Settings->Document Peferences->Generate Logfile in document is not set.

(02.10.2019 23:26:54) Information: Closing the document.

(02.10.2019 23:26:55) Information: Closed the QlikView Engine successfully. ProcessID=10860

(02.10.2019 23:26:55) Error: The task "Huber GmbH/Import PM/Import Aufträge PM - Test.qvw" failed. Exception: || QDSMain.Exceptions.TaskFailedException: Task execution failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed ---> QDSMain.Exceptions.LogBucketErrorException: The Source Document was NOT reloaded successfully. DocumentPath=D:\Qlikview\Huber GmbH\Import PM\Import Aufträge PM - Test.qvw. || bei QDSMain.AbstractReloadTask.VerifyConditions(IExecutingTaskResult executingTaskResult) || bei QDSMain.AbstractReloadTask.Reload(String fileName, IExecutingTaskResult executingTaskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage) || --- Ende der internen Ausnahmestapelüberwachung --- || bei QDSMain.AbstractReloadTask.Reload(String fileName, IExecutingTaskResult executingTaskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage) || bei QDSMain.DistributeTask.PerformExecute(IExecutingTaskResult executingTaskResult) || --- Ende der internen Ausnahmestapelüberwachung --- || bei QDSMain.DistributeTask.PerformExecute(IExecutingTaskResult executingTaskResult) || bei QDSMain.Task.AbstractTask.TaskExecution(CurrentExecutionArgs args)

(02.10.2019 23:26:55) Information: Task Execute Duration=00:00:14.1250295

(02.10.2019 23:26:55) Information: Sending Alert mail

(02.10.2019 23:26:55) Information: TaskResult.status=Finished

(02.10.2019 23:26:55) Information: Notifying all triggers of new state: "FinishedWithErrors"...

(02.10.2019 23:26:55) Information: Notifying all triggers of new state: "FinishedWithErrors" - Completed

Josh_Berg_Support

That is the task log, we need the document log.  Please see the following article which will show you how to enable the document log in Qlikview Desktop.  After you've enabled the document log, try reloading the QVW again from the QMC and send us the log, that should give you a better idea why the reload is failing.

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
hbuchetmann
Contributor III
Contributor III
Author

I think i narrowed the problem down. I installed the same Desktop Client  Version as the Server.

When i now load the skript manually it runs into an error as well.

In the skript i first get a token with a /rest/login (method=post)  and write this token into a variable :

 

CUSTOM CONNECT TO
"Provider=QvRestConnector.exe;url=https://...../rest/login;
timeout=30;
method=POST;

...

[rootkey]:
LOAD  [token_type]&' '&[access_token] AS Token RESIDENT RestConnectorMasterTable;

RestConnectorMasterTable:
SQL SELECT
"token_type",
"accessToken"
FROM JSON (wrap on) "root";

 

Let v_Token = FieldValue('Token',1);

 

Then i put this Variable in a second API request with the variable as authorization:

 

CUSTOM CONNECT TO

"Provider=QvRestConnector.exe;url=https://.../rest/orders;
timeout=30;
method=GET;
httpProtocol=1.1;
isKeepAlive=1;
bodyEncoding=UTF-8;
sendExpect100Continue=1;
autoDetectResponseType=1;
checkResponseTypeOnTestConnection=1;
keyGenerationStrategy=3;
authSchema=anonymous;
skipServerCertificateValidation=0;
useCertificate=No;
certificateStoreLocation=CurrentUser;certificateStoreName=My;
queryParameters=statusFrom%27.2%1statusTo%27.2;
addMissingQueryParametersToFinalRequest=1;
queryHeaders=Authorization%2$(v_Token);
PaginationType=None;
allowResponseHeaders=0;
allowHttpsOnly=0;

This worked fine with the Desktop version August 19.

With the 12.1 Version the token request gets through, but then i get an "HTTP protocol error 401 (Unauthorized):" with the get /rest/orders.

The Token which is wirtten into the variable is very long. 

Here an example:

Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjQwZTZjNjI5MjhlOTViNTUwOGFmYzM0MjlkYWFiN2E0N2Y4MDM2MGIyNjJkYzgyYjMyZGIzZmQ5MzdlMzgwYmVkMGYzMGMxY2JhZTJhY2Q4In0.eyJhdWQiOiIxIiwianRpIjoiNDBlNmM2MjkyOGU5NWI1NTA4YWZjMzQyOWRhYWI3YTQ3ZjgwMzYwYjI2MmRjODJiMzJkYjNmZDkzN2UzODBiZWQwZjMwYzFjYmFlMmFjZDgiLCJpYXQiOjE1NzAwNTQ4MDEsIm5iZiI6MTU3MDA1NDgwMSwiZXhwIjoxNTcwMTQxMjAxLCJzdWIiOiI0Iiwic2NvcGVzIjpbIioiXX0.cwb55kzmZ4iAql_jdlWDfHq8j5pHU3AoLTRwZWQVv1uuonIN1x1iaq--IU0d-QNfWOCkc3z61M9RKEd1cQ432-iOwX8OSzUPSDMAsuySNnPtiHBg3OgAniL2Kil0sxYQBLG-rCyGVn1g6yMrtHbrUEdjychmDSd3SY2-Am-ttS5VFd3XwA446hibznvse7LoZrAWSBxwoX_H1atjZ6rDizrn8x9Hu7AKCPmFaTuzA7SKPxvYA6SfFZJKQeg8wtOG8XwhDhsa7DIBbBzjmABvauMIrD-xyKp0bTPZ_FsF6XKs87b5q-n7r2a9A9bvAe6HctqA6oZvEY1-W_0fal8LQ5AfW6zwsv0M7t4Q4EfchdrllY7VfpubqC4Zbh27StilxXvdGVV8VG28nBKROC_icLFrkTzme3yN40T33cd3UqsIp78X2BCJD59x5JZ1kHhFaeNiMHLvN-ODE9wOWcoJ13vCRmuWKRpzFrUZqh9fkQwq0G80KlY6_mkFCmuDND0aiKbT8Dn21od0pRJ03irS_9qNiYtTC8OWYkNOAGhZ33EhwxfwX_xyM3C566L2ylGSWMh9p2EDcbbXfNsX0VpD3gfi2xAwJQMSV57dgBXAoShOXtoaoPpAeJNph50UKXQaRK0B-eAQmRfMGeUKGSYDFZfdnJlvILyKr-17cGofYKM

Any Suggestion how i can make this work again with the variable in 

queryHeaders=Authorization%2$(v_Token);

?

Brett_Bleess
Support (Former)
Support (Former)

Best I can do is the Help on things to be sure you have not missed something documented there, if you find something not working as documented, please submit a support case to use at that point, so we can address with R&D.

https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Create...

You mentioned version 12.10 as well, note support for 12.10 is ending in about 4 weeks as well and you should update to a new version to ensure future support.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
hbuchetmann
Contributor III
Contributor III
Author

HI Brett,

 

we updated the Qlikview Server to the latest Version, now it works fine.

The Value inside $(v_Token) (the token) in the line: queryHeaders=Authorization%2$(v_Token);

is pulled correctly now.

It looks like the older Server Version handled Values inside a variable differently than the newest.

Thank you for your suggestions and help.

 

Best wishes from germany,

 

Hermann

 

View solution in original post

PreranaLH
Contributor
Contributor

can you please explain what exactly i have to do to generate Token

and this token will different for each table or same?