Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jan 26, 2023 4:08:16 AM
Nov 8, 2021 10:34:41 AM
QVW files imported with qlik-cli or with the REST API do not appear in the hub. The same works for QVF files.
This is currently a limitation in qlik-cli/the REST API for QVW files. To make the QVW appear in the hub, it is necessary to register the item manually.
Below is an example for the REST API (PowerShell):
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$hdrs = @{}
$hdrs.Add("Authorization","Bearer eyJhbGciOiJFUzM4NCIsImtpZCI6Ijc5ZmY..rdSoUUT5uH")
$hdrs.Add("content-type","application/octet-stream")
$filepath = "C:\qlikcli\testcli.qvw"
$url = "https://mytenant.eu.qlikcloud.com/api/v1/apps/import"
$resp = Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -InFile
$body='{"name":"testcli2.qvw","resourceId":"'+$resp.attributes.id+'","resourceType":"qvapp","description":"","resourceAttributes":{"id":"'+$resp.attributes.id+'","name":"testcli.qvw","description":"","thumbnail":"/api/v1/apps/'+$resp.attributes.id+'/media/files/DocumentThumbNail.png","lastReloadTime":"2021-08-17T13:48:19.568Z","createdDate":"2021-08-19T10:08:02.652Z","modifiedDate":"2021-08-19T10:08:03.194Z","owner":"'+$resp.attributes.owner.replace( '\', '\\')+'","ownerId":"'+$resp.attributes.ownerId+'","dynamicColor":"","published":false,"publishTime":"","hasSectionAccess":true,"encrypted":true,"originAppId":"","_resourcetype":"qvapp"},"resourceCustomAttributes":{},"resourceCreatedAt":"2021-08-19T10:08:02.652Z","resourceCreatedBySubject":"'+$resp.attributes.owner.replace( '\', '\\')+'"}'
$hdrs = @{}
$hdrs.Add("Authorization","Bearer eyJhbGciOiJFUzM4NCIsImtpZCI6Ijc5ZmY..rdSoUUT5uH")
$hdrs.Add("content-type","application/json")
$url = "https://mytenant.eu.qlikcloud.com/api/v1/items"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body
QB-6750