Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to get Powershell to import an App on the central node of a QS 2.1.1 deployment. It is multi-node (if that makes any difference).
So far, I have successfully set up a Virtual Proxy for header auth and tested it using such commands as:
<server>/qrs/user/count?xrfkey=<xrfkey>
and all the relevant headers. This powershell script is based on QRSAPI - Remove Unwanted Users with PowerShell
However, when I come to use the "/qrs/app/import?name={name}&keepdata={keepdata}&replace={replace}" call
I'm getting a "The remote server returned an error: (403) Forbidden." response.
I'm getting a "The remote server returned an error: (400) Bad Request" (I'd missed off the xrfkey in the above error on this specific call - doh)
The App is in %ProgramData%\Qlik\Sense\Apps folder.
Details:
----------
POST request to: http://<machinename>/<prefix>/qrs/app/import?name=<app name to be assigned>
Xrfkey, UserId and headers required by the virtual proxy have all been set correctly (I believe).
body = "{
'id':'00000000-0000-0000-0000-000000000000',
'columns':
[
{
'name':'current_filename.qvf',
}
]
}"
content type = "application/json"
I'm pretty certain that it is down to my usage of this API call as GET requests seem to work fine. Can anyone help please?
Thanks,
Dave
Thanks Dave for quick response. I could solve the issue. The issue was with the file location where it was kept. I kept the file at \ProgramData\Qlik\Sense\Apps\ location. But form 3.0 onwards we need to keep the file based on the user in \ProgramData\Qlik\Sense\Apps\<LoginDomain>\<user>\ folder. After I moved the file to this location, it got imported successfully.
Thanks. This helps.
File needs to be kept under login domain user otherwise it gives "The specified filename is invalid." error and you won't able to figure out issue from description.
This should be added in documentation.