Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 11, 2021 5:59:09 AM
Aug 8, 2017 6:45:38 AM
In Qlik Sense, applications can be imported via the QRS API.
This is done by placing the application to import in a local folder, and then calling the /qrs/app/import endpoint.
Qlik Sense Enterprise on Windows
To import an app via the QRS API, do the following:
GET /qrs/app/importfolder?Xrfkey=abcdefghijklmnop HTTP/1.1
Host: qlikserver1.domain.local
X-Qlik-Xrfkey: abcdefghijklmnop
Cache-Control: no-cache
Postman-Token: 9329144b-cb8b-b19c-5bb4-726bd96912b8
PowerShell sample:
Response Body:
"C:\\ProgramData\\Qlik\\Sense\\Apps\\DOMAIN\\administrator"
POST /qrs/app/import?Xrfkey=abcdefghijklmnop&name=someAppName HTTP/1.1
Host: qlikserver1.domain.local
X-Qlik-Xrfkey: abcdefghijklmnop
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: d02c29e5-a340-51b6-aa1f-8d350be6f511
"ABC Sales Data.qvf"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$body = '"apptoimport.qvf"'
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","iX83QmNlvu87yyAB")
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$url = "https://qlikserver1.domain.local:4242/qrs/app/import?xrfkey=iX83QmNlvu87yyAB&name=nameafterimport"
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $hdrs -Certificate $cert
Response Body:
{
"id": "aab16fd4-73bd-42ee-89d3-44d921e6218b",
"createdDate": "2017-08-07T11:44:44.879Z",
"modifiedDate": "2017-08-07T11:44:46.148Z",
"modifiedByUserName": "INTERNAL\\sa_repository",
"customProperties": [],
"owner": {
"id": "c8adc9c9-ebab-44fc-8038-69610755f0c4",
"userId": "administrator",
"userDirectory": "DOMAIN",
"name": "administrator",
"privileges": null
},
"name": "someAppName",
"appId": "",
"publishTime": "1753-01-01T00:00:00.000Z",
"published": false,
"tags": [],
"description": "",
"stream": null,
"fileSize": 558263,
"lastReloadTime": "2017-06-16T08:59:19.019Z",
"thumbnail": "",
"savedInProductVersion": "12.11.6",
"migrationHash": "64d115e925e2167bba72939c2d8a80e6beef4a56",
"dynamicColor": "",
"availabilityStatus": 0,
"privileges": null,
"impactSecurityAccess": false,
"schemaPath": "App"
}