Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Feb 5, 2024 4:12:00 AM
Nov 12, 2020 6:37:19 AM
Qlik Cloud has a built-in method to export apps from your managed spaces, along with APIs available which allow for automation.
Content:
This is the recommended method.
As of the 30th of January 2024, Qlik Cloud has introduced the functionality to Export apps from Managed Spaces.
Space Owner and users with the "Can Manage" role, can now export Qlik Cloud apps from Managed Spaces.
These apps can only be exported without data. Storytelling is not exported.
This possibility allows you to re-establish a parent - child relation of your source and published apps, in case the source app was accidentally deleted.
For more information, see:
You can also export the app from a managed space without data through the REST API or Qlik Cli in a supported way.
These apps can only be exported without data, even if the NoData parameter is not set to true. Storytelling is not exported.
Requirements:
$hdrs = @{} $hdrs.Add("Authorization","Bearer eyJhbGciOiJFUzM4NCIsImtpZCI6IjUzYj...VJaO0zSKZs7Q") $tenanturl = "https://yourtenant.ap.qlikcloud.com" $appid = "7972e3ae-df5c-4ed3-81f4-e2220d76972d" $url = $tenanturl+"/api/v1/apps/"+$appid+"/export?NoData=true" $output = "C:\temp\MyExportedApp.qvf" $firstcall=Invoke-WebRequest -Uri $url -Method Post -Headers $hdrs $url2= $tenanturl+$firstcall.Headers.Location echo $url2 Invoke-RestMethod -Uri $url2 -Method Get -Headers $hdrs -ContentType 'multipart/form-data' -OutFile $output
Reference:
Exports a specific app | Qlik Developer
qlik app export 7972e3ae-df5c-4ed3-81f4-e2220d76972d --NoData > C:\temp\MyExportedApp.qvf
Reference:
Alternatively, an app can be unpublished from a Managed space and obtained for editing. This method maintains data, including storytelling.
Use this method at your own risk. Direct API calls make changes which bypass safety nets and the end result can lead to unexpected results.
Requirements:
This will move the app from a Management Space to your Personal space with the REST API.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $body='{"spaceId":""}' $hdrs = @{} $hdrs.Add("Authorization","Bearer eyJhbGciOiJM4ImtpZCI6IjBkZmQ5YzM2LTcy...YLmG54QLpd") $hdrs.Add("content-type","application/json") $url = "https://yourtenant.eu.qlikcloud.com/api/v1/apps/APPID/space" Invoke-RestMethod -Uri $url -Method Put -Headers $hdrs -Body $body
Troubleshooting:
See following article if any TLS/SLL error are output when running the PowerShell script:
Qlik Sense API: Could not create secure SSL/TLS channel (Powershell)
This will move the app from a Management Space to your Personal space with the REST API, wrapped in the QLIK-CLI.
Alternatively, if qlik-cli is installed, the following commands can be used. In the code, replace APPID with the correct one (e.g. 68aae8b0-3770-435d-951d-7b97469fb78b).
qlik app owner APPID
qlik app space update APPID
qlik app space update APPID --spaceId SPACEID
The admin using the qlik-cli commands will need to have full permissions on the Managed space that hosts the app.
Use this method at your own risk. The direct API calls used in this workaround make changes which bypass safety nets and the end result can lead to unexpected results.
Hello @sten_lomme Glad this worked!
I am aware that our Ideation team is working on having the process improved, meaning you should be able to log in seamlessly whenever you click any link in the future.
All the best,
Sonja
@Sonja_Bauernfeind do you know if any of these methods keep the personal sheets for all users? Its typical for us to have a few hundred unpublished personal sheets created by our users. I tested the automation method and lost the personal sheets.
Hello @mgranillo
This method is only meant to be used as a workaround if the original app has been lost and will bypass safety nets. It is specific to the published app and published content. I will reach out internally if we have anything on hand regarding personal sheets, but I believe that I will need to redirect the question to our API forum.
Will get back to you as soon as possible.
All the best,
Sonja
Hi @mgranillo , I just tested this with the Qlik-cli and private sheets are preserved.
As the Qlik-cli is just a wrapper for the APIs, the API method is expected to work as well.
You can do some testing as well to confirm.
@Daniele_Purrone the CLI method is working for me but I'm seeing something strange. After moving the app to the owner's personal space (step 2 above in method 2), I have non app owners that are able to see the app in their personal space. The duplicate is appearing as well in a non-owners personal space. The QMC does not show a copy in the non-owner's personal space yet I'm seeing the apps across two users.
To boil it down another way, a user is seeing an app that they don't own in their personal space. What is going on here?
@Sonja_Bauernfeind In this workaround, the app is pulled down from production. Is that right? Our apps need to be up while we makes updates. A lot of our apps are utilized on a daily basis to answer business questions. Some updates may take weeks. We can't have our apps down for weeks. Can nothing else be done?
Is there any way to correct this so that we can overwrite the app again?
Hello @mgranillo
To be able to assist you better (and to give you a chance to get access to a larger audience), please summarize what you are aiming to do and what you want to achieve, as well as what challenge you've been facing and post this in the API forum (if you are looking to build a solution using our APIs) or the App Development forum (if you are facing general app development/process challenges).
All the best,
Sonja