Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
alessandrozagoto
Contributor III
Contributor III

templateLocation error

Using the /api/v1/reports api with an excel template, it requires the path of a template in the templateLocation parameter, I tried to enter the path of a template in OneDrive, but it didn't work, how do I enter the template in this parameter?

Labels (3)
5 Replies
alex_colombo
Employee
Employee

Hey @alessandrozagoto as per our doc you have to specified a template path loaded into your Qlik app. 

From docs: "The location of the report template. Currently it can be an absolute or relative URL to a persisted report template, or to a template file saved as temporary content, as in the following examples: - https://qlikcloud.com:443/api/v1/report-templates/223940f7-3170-46b7-91ea-e0c81230adf7 - https://qlikcloud.com:443/api/v1/temp-contents/653bb4acae966r0730da15fc".

 

Did you load an excel template into Reporting --> Template section? If so, you can use this endpoint for reading current templates.

alessandrozagoto
Contributor III
Contributor III
Author

Hi, the template is already available in Qlik, but when testing the endpoints, none of the template URLs ended up being available.

alessandrozagoto_0-1730915318606.png

 

alessandrozagoto
Contributor III
Contributor III
Author

Just confirming that neither of the two previous examples are working

alex_colombo
Employee
Employee

Can you please share template endpoint? How did you get the endpoints?

jptneumann
Partner Ambassador
Partner Ambassador

Hi!

First you must get the id of your report template. This can be done by editing your template and getting the code in the URL.

ex:
https://<YourTenant>.us.qlikcloud.com/sense/app/ccc4baaa-b7ca-4ad7-ae2c-635a72bdce31/reports/templates/aec39a54-9507-4f00-af08-9a51d6b6c77e/pixelperfect

Your template ID in this example is:
aec39a54-9507-4f00-af08-9a51d6b6c77e

Then generate the url as follows:

https://<YourTenant>.<YourLocation. Ex: us>.qlikcloud.com/api/v1/report-templates/<id of your report template>

In this case considering my tenant is xyz and my location as us: 

https://xyz.us.qlikcloud.com/api/v1/report-templates/aec39a54-9507-4f00-af08-9a51d6b6c77e