Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In the company that I work at, we've got many extensions and I want to get rid of most of them. To do that, I'd need first to check which dashboards they are used in.
I couldn't find it in https://qlik.dev/apis/rest/
I've seen there's an application "Extension Usage Dashboard-master" but unfortunately doesn't seem to be compatible with Qlik Cloud
Any clue? Thank you
Hi @dmnab1 ,
This is a great question, and one that is a bit nuanced and evolving. Here is some information:
Option 1:
With all of the above said, the most user-friendly way of getting this data is through using QAA. I have attached a sample automation that loops through each sheet (public, community, and private that you own) and lists out the object types and owners, etc. You do not want to do this for all applications on the tenant as currently QAA can only open apps with data. To use it, create a new automation, provide a name, right-click in the canvas area, and select "Upload workspace".
Just enter in an App Id and it will do the rest for you.
Option 2:
To scan everything in the tenant (because we can open the apps without data) you can use the Qlik-CLI. Again, this will be missing private content owned by other users for now (coming very soon). Here is an example snippet that will iterate through every app on the tenant and return all object titles, IDs, types, and whether they are a master object (including the underlying type).
$filePath = "C:\Test\metadata.csv";
New-Item -path $filePath -type "file" -Force
$header = 'Object Title,Object Type,Object ID,App ID,Is Master Object';
Set-Content $filePath -Value $header;
$apps = qlik app ls --limit 99999 --json | ConvertFrom-Json;
foreach ($app in $apps) {
$metadata = New-Object System.Collections.ArrayList;
$tempMetadata = qlik app object ls -a $app.resourceId --no-data --json | ConvertFrom-Json;
foreach ($object in $tempMetadata) {
if (!@('LoadModel', 'sheet', 'appprops').contains($object.qType)) {
$objectMetadata = @{};
$objectMetadata | Add-Member -Name appId -Value $app.resourceId -MemberType NoteProperty;
$objectMetadata | Add-Member -Name isMasterObject -Value 0 -MemberType NoteProperty;
if ($object.qType -eq "masterobject") {
$objectType = (qlik app object properties -a $app.resourceId $object.qId --no-data --json | ConvertFrom-Json).visualization;
$objectMetadata['qType'] = $objectType;
$objectMetadata['isMasterObject'] = 1;
}
else {
$objectMetadata['qType'] = $object.qType;
}
$objectMetadata['objectId'] = $object.qId;
$objectMetadata['objectTitle'] = $object.title;
$metadata.add($objectMetadata) | Out-Null;
}
}
$metadata | ConvertTo-Csv | Select-Object -Skip 1 | Out-File -Append $filePath;
}
Which will yield something like the below:
Object Title | Object Type | Object ID | App ID | Is Master Object |
My Listbox | listbox | 12c4cf53-e2e9-44d7-82f7-105ac4ba9716 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 16ed0a5b-b0de-4e5c-ba50-0bfa46a2b8bf | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Listbox | listbox | 29cda91c-07e6-4019-919d-ac193b8acefd | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 2a01f1e5-996a-4eac-8591-5257d9a0bfb8 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My KPI | kpi | 31ce1f9a-b470-44e4-942b-db4ae2ba3679 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 35421fac-ef16-40df-9354-150edd28a34f | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 1 |
Again, this is a changing landscape in Qlik Cloud, so stay tuned for updates.
Cheers,
Hi @dmnab1 ,
This is a great question, and one that is a bit nuanced and evolving. Here is some information:
Option 1:
With all of the above said, the most user-friendly way of getting this data is through using QAA. I have attached a sample automation that loops through each sheet (public, community, and private that you own) and lists out the object types and owners, etc. You do not want to do this for all applications on the tenant as currently QAA can only open apps with data. To use it, create a new automation, provide a name, right-click in the canvas area, and select "Upload workspace".
Just enter in an App Id and it will do the rest for you.
Option 2:
To scan everything in the tenant (because we can open the apps without data) you can use the Qlik-CLI. Again, this will be missing private content owned by other users for now (coming very soon). Here is an example snippet that will iterate through every app on the tenant and return all object titles, IDs, types, and whether they are a master object (including the underlying type).
$filePath = "C:\Test\metadata.csv";
New-Item -path $filePath -type "file" -Force
$header = 'Object Title,Object Type,Object ID,App ID,Is Master Object';
Set-Content $filePath -Value $header;
$apps = qlik app ls --limit 99999 --json | ConvertFrom-Json;
foreach ($app in $apps) {
$metadata = New-Object System.Collections.ArrayList;
$tempMetadata = qlik app object ls -a $app.resourceId --no-data --json | ConvertFrom-Json;
foreach ($object in $tempMetadata) {
if (!@('LoadModel', 'sheet', 'appprops').contains($object.qType)) {
$objectMetadata = @{};
$objectMetadata | Add-Member -Name appId -Value $app.resourceId -MemberType NoteProperty;
$objectMetadata | Add-Member -Name isMasterObject -Value 0 -MemberType NoteProperty;
if ($object.qType -eq "masterobject") {
$objectType = (qlik app object properties -a $app.resourceId $object.qId --no-data --json | ConvertFrom-Json).visualization;
$objectMetadata['qType'] = $objectType;
$objectMetadata['isMasterObject'] = 1;
}
else {
$objectMetadata['qType'] = $object.qType;
}
$objectMetadata['objectId'] = $object.qId;
$objectMetadata['objectTitle'] = $object.title;
$metadata.add($objectMetadata) | Out-Null;
}
}
$metadata | ConvertTo-Csv | Select-Object -Skip 1 | Out-File -Append $filePath;
}
Which will yield something like the below:
Object Title | Object Type | Object ID | App ID | Is Master Object |
My Listbox | listbox | 12c4cf53-e2e9-44d7-82f7-105ac4ba9716 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 16ed0a5b-b0de-4e5c-ba50-0bfa46a2b8bf | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Listbox | listbox | 29cda91c-07e6-4019-919d-ac193b8acefd | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 2a01f1e5-996a-4eac-8591-5257d9a0bfb8 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My KPI | kpi | 31ce1f9a-b470-44e4-942b-db4ae2ba3679 | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 0 |
My Line Chart | linechart | 35421fac-ef16-40df-9354-150edd28a34f | 0c3c8b42-5211-486a-9170-16bf7c6f7874 | 1 |
Again, this is a changing landscape in Qlik Cloud, so stay tuned for updates.
Cheers,
That's what I was looking for! Thanks @Daniel_Pilla for sharing it
Hi @Daniel_Pilla - I tried option 2 and tested for a single app but get this output in the csv. Is there something I'm missing?
Hi @psublue98 ,
What version of PS are you running? The above was built and tested on 7.3.11. I would also add in some logging and breaks to see what is happening along the way and where it breaks.
Cheers,
Thanks Daniel, certainly closer using 7.4.1. The title isn't coming across though...
Hello @Daniel_Pilla Does that "very soon " has arrived?
Because i want migrate from one Tenant to other i facing the issue of Private content not getting
Hi @TcnCunha_M - yes, this is now possible. You can list all sheets within an application using OAuth and the required scopes. You can find a guide on how to do that with Qlik-API here: https://qlik.dev/manage/platform-operations/private-content-bots/ -- For use with the CLI, follow the same steps to setup the OAuth client, and then connect the Qlik-CLI via OAuth.
Hope this helps!
Cheers,
about he bookmarks work in the same way ?
Hi @Daniel_Pilla
I am trying but my apps has session access. so even if using AUTH0 authentication doesn't work and I'm getting access is denied, I have added the Qlikbot user into the session access, Do you have any idea if there a trick to overlap this?