Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Download an existing app, identified by {appId}, using an {exportTicketId}.
Hi Adam,
Maybe the script provided as the solution here may get you in the right direction: https://community.qlik.com/t5/Integration-Extension-APIs/QRS-Export-App-without-data/td-p/128474
$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$body = '{}'
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
$guid = [guid]::NewGuid()
$download = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/App/c9fadcd3-20f5-434b-a0f8-a73e46943294/export/$($guid)?xrfkey=examplexrf..." -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
Invoke-RestMethod -Uri "https://$($FQDN):4242$($download.downloadPath)" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert | Set-Content small.qvf -Encoding Ascii
Also, the API Endpoint you are currently using is not the suggested method for exporting apps. See these resources:
https://help.qlik.com/en-US/sense-developer/February2023/Subsystems/RepositoryServiceAPI/Content/Sen...
Hi Adam,
Maybe the script provided as the solution here may get you in the right direction: https://community.qlik.com/t5/Integration-Extension-APIs/QRS-Export-App-without-data/td-p/128474
$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$body = '{}'
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
$guid = [guid]::NewGuid()
$download = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/App/c9fadcd3-20f5-434b-a0f8-a73e46943294/export/$($guid)?xrfkey=examplexrf..." -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
Invoke-RestMethod -Uri "https://$($FQDN):4242$($download.downloadPath)" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert | Set-Content small.qvf -Encoding Ascii
Also, the API Endpoint you are currently using is not the suggested method for exporting apps. See these resources:
https://help.qlik.com/en-US/sense-developer/February2023/Subsystems/RepositoryServiceAPI/Content/Sen...