You seems to be using
old browser.

To get the most our of #!% please visit us from one of the following browsers.

menu

Services

menu

Solutions

menu

Unified Data Platform

menu

Airport

menu

Consumer Packaged Goods

menu

Retail

menu

Financial Services

menu

Automotive

menu

HR Analytics

menu

Partnerships

menu

Company

menu

About Us

menu

Partnerships

menu

Resources

menu

CSR

menu

Contact Us

Blogs

Generating API keys in Qlik Sense SaaS:

By admin, Dec 14, 2023

Introduction

In the ever-evolving landscape of data analytics, efficiency and automation are paramount. Qlik Sense SaaS, a powerful analytics platform, empowers organizations to harness the full potential of their data. To enhance user experience and streamline operations, GainInsights Solutions presents a comprehensive guide on “How to Generate API Keys in Qlik Sense SaaS using APIs.”

Generating an API Key

The process of generating an API key in Qlik Sense SaaS is straightforward, thanks to the Qlik-CLI command line interface. This tool facilitates easy scripting and automation of various workflows, such as importing, exporting, publishing, and re-publishing apps, space management, app creation, and user administration.

To generate an API key, follow these steps:

Log in to your Qlik Sense SaaS Tenant.
Click on the profile icon in the upper right corner.

Access Profile Settings.

Navigate to API Keys in the Management section.

Click on ‘Generate new key’ and provide a description along with the expiration duration.

Click ‘Generate’ to obtain the API key.

This straightforward process ensures that users can effortlessly create API keys tailored to their specific needs.

Script for Generating a New API Key Using the Old API

For those looking to automate the process of generating a new API key using the old one, GainInsights Solutions provides a PowerShell script. This script ensures a seamless transition and continuity of operations. Here’s a breakdown of the script:

To generate a new API key using the old one, the following script can be used. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$body='{“description”:”**1**”,”expiry”:”**2**”}’
$hdrs = @{}
$hdrs.Add(“Authorization”,”Bearer **3**”)
$hdrs.Add(“content-type”,”application/json”)
$url = “**4**/api/v1/api-keys”
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body

The script involves configuring specific parameters such as API key description, expiration duration, and the key itself. It’s crucial to ensure accuracy in the description, adhere to ISO Standard’s Duration Code for expiration, and use the correct Qlik Sense Enterprise SaaS URL.

Upon running the script in PowerShell, users will receive a new API key, seamlessly replacing the old one. This automated approach simplifies the entire process.

Limitations

While the process is efficient, it’s essential to be aware of certain limitations:

The PowerShell query is applicable only when the existing API key is still in use and hasn’t expired.
The new API key inherits the expiration duration of the old one.
The API key must be copied from the PowerShell script, as the encrypted key is not visible in the Qlik console.
Users must copy and store both the expiration duration and the API key for future use.

Troubleshooting

To ensure a smooth process, adhere to the following troubleshooting guidelines:

The ISO Standard for the duration must exactly match the chosen duration in Qlik.
Discrepancies in the duration specified in Qlik and the PowerShell script may result in errors.

Usage and Referral Links

The generated API keys can be used to enhance security and streamline operations. GainInsights Solutions recommends scheduling the PowerShell script to retrieve new API keys upon the expiration of existing ones, ensuring uninterrupted analytics operations.

For further assistance and insights, refer to the following links:

How to install and start using Qlik-CLI for SaaS
Know more about ISO Standard for Duration

In conclusion, by simplifying the process through clear steps and providing an automated script for key regeneration, organizations can enhance their data analytics operations seamlessly. While acknowledging certain limitations, such as inheriting the expiration duration of the old key, the benefits of automation, security, and uninterrupted analytics operations far outweigh these considerations. By following the outlined steps and embracing the referral links for additional insights, businesses can unlock the full potential of Qlik Sense SaaS, ensuring a streamlined and efficient data analytics journey.

Contact us or write to info@gain-insights.com to explore a hands-on session or a discussion.

RECENT POSTS

Looking to connect with us?

Start a conversation