Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
Partner
Partner

QRS API with Powershell

Hi All,

I am trying to use the powershell script to call the QRS API. I am able to connect using the below help article with "http" but with https it doesnt work. Because of the SSL certificate error.

Does anyone know how to include  ssl request in powershell.

Connecting with Microsoft Powershell

Connecting with Microsoft Powershell
Microsoft Powershell is an integrated command line shell for Microsoft Windows. Many elements of the .NET Framework can be used from within Powershell to connect to the Qlik Sense Repository Service (QRS) API.

The following example shows how to use Powershell to connect to the QRS API and retrieve a list of apps in JSON format. Since Microsoft Windows authentication is used in this example, the proxy URL is specified.

$req = New-Object System.Net.WebClient

$req.Credentials = [System.Net.CredentialCache]::DefaultCredentials

$req.QueryString.Add("xrfkey", "ABCDEFG123456789")

$req.Headers.Add("X-Qlik-xrfkey", "ABCDEFG123456789")

$req.DownloadString("http://servername.com/qrs/app")

Thanks,
Aadil

1 Solution

Accepted Solutions
Employee
Employee

Re: QRS API with Powershell

Is there a specific need to go through QPS like this example is doing?

If not then I'd point to something like this: https://github.com/levi-turner/QlikSenseScripts/blob/master/qlik_sense_qrs_generic-GET.ps1

3 Replies
Employee
Employee

Re: QRS API with Powershell

Is there a specific need to go through QPS like this example is doing?

If not then I'd point to something like this: https://github.com/levi-turner/QlikSenseScripts/blob/master/qlik_sense_qrs_generic-GET.ps1

Partner
Partner

Re: QRS API with Powershell

Thank you!

Employee
Employee

Re: QRS API with Powershell

For access to the APIs via PowerShell have a look at Qlik-Cli

https://github.com/ahaydon/Qlik-Cli

You can either use the functionality built-in to the module or develop your own using the commands:

Invoke-QlikGet

Invoke-QlikPut

Invoke-QlikPost

Invoke-QlikDelete