Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Mar 7, 2023 8:09:25 AM
Apr 16, 2021 7:29:30 AM
This is a sample of how to call a REST API in Qlik Sense Enterprise SaaS with PowerShell.
To begin, an API key needs to be created which will be used to call the API, see the following tutorial:
https://qlik.dev/tutorials/generate-your-first-api-key
All API endpoints available can be found at https://qlik.dev/apis
The URL used when calling the API should be https://{tenant name and region}.qlikcloud.com/api/v1/{endpoint}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$hdrs = @{}
$hdrs.Add("Authorization","Bearer eyJhbGciOiJFUzM4NCIsImtpZ....moMC2G")
$url = "https://mytenant.eu.qlikcloud.com/api/v1/apps/adf40cb9-ecbf-41c0-bfd5-cdcfe89e0ae9"
Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs
@Sonja_Bauernfeind Thanks for this! I was able to successfully GET info but is it possible to get the actual data that the fields contain? I see the field names, data types, etc but not the data they contain. Is there a way to do that? Read data? Thanks!
Hello @VC1258
This is a bit out of scope for this article - I'd recommend posting this question in the appropriate forum. where you'll be able to get input from our support engineers and our active user base.
The specific forum you'd be looking at is Integration Extension and APIs.
All the best,
Sonja