Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 1, 2025 2:03:17 AM
Jul 1, 2025 2:03:17 AM
The information in this article is provided as-is and will be used at your discretion. Depending on the tool(s) used, customization(s), and/or other factors, ongoing support on the solution below may not be provided by Qlik Support. For assistance, engage with our active Connectivity and Data Prep forums.
This article outlines an approach to connect Snowflake using API calls and Key Pair Authentication to Qlik Sense Enterprise on Windows.
To begin, you will need to obtain the connection details in JSON format. The three steps outlined here are a possible way to do so; you may have different methods available to you.
get /dataconnection/{id}
For more information, read get /dataconnection/{id}.# Ignore SSL validation errors
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
# Force TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Headers and cert
$hdrs = @{
"X-Qlik-xrfkey" = "12345678qwertyui"
"X-Qlik-User" = "UserDirectory=internal;UserId=sa_repository"
}
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where-Object { $_.Subject -like '*QlikClient*' }
if (-not $cert) {
Write-Error "Qlik client certificate not found!"
exit
}
# API URL
$url = "https://qlikserver1.domain.local:4242/qrs/dataconnection/400af54c-9913-4e49-90fb-d6e9fecbe3f6?xrfkey=12345678qwertyui"
# Make request
$resp = Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs -Certificate $cert
$resp | ConvertTo-Json -Depth 10
The JSON result from the above GET will look like this:{
"id": "400af54c-9913-4e49-90fb-d6e9fecbe3f6",
"createdDate": "2025-06-13T13:29:39.611Z",
"modifiedDate": "2025-06-13T13:29:39.611Z",
"modifiedByUserName": "DOMAIN\\qvservice",
"customProperties": [],
"owner": {
"id": "874751d5-61f2-411a-bba2-147c68581471",
"userId": "qvservice",
"userDirectory": "DOMAIN",
"userDirectoryConnectorName": "",
"name": "qvservice",
"privileges": null
},
"name": "Snowflake_no_encrypted (domain_qvservice)",
"connectionstring": ""CUSTOM CONNECT TO \"provider=QvOdbcConnectorPackage.exe;driver=snowflake;server=JIPCXQB-ATTUNITY_PARTNER.snowflakecomputing.com;po
rt=443;database=testDATABASE;schema=PUBLIC;warehouse=MONO_TEST;validateSessionParam=false;role=SYSADMIN;authenticator=snowflake_jwt;allowNonSelectQueries=fa
lse;QueryTimeout=600;useBulkReader=true;maxStringLength=4096;\"",
"type": "QvOdbcConnectorPackage.exe",
"engineObjectId": "",
"username": "jmkxxxx",
"password": "PRIV_KEY_FILE%2rsa_key.p8%%2LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0.........", //see note bellow
"architecture": 0,
"privileges": null,
"schemaPath": "DataConnection"
}
Post /dataconnection
For more information, read post /dataconnection.{
"id": "400af54c-9913-4e49-90fb-d6e9fecbe3f6",
"createdDate": "2025-06-13T13:29:39.611Z",
"modifiedDate": "2025-06-13T13:29:39.611Z",
"modifiedByUserName": "DOMAIN\\qvservice",
"customProperties": [
],
"owner": {
"id": "874751d5-61f2-411a-bba2-147c68581471",
"userId": "qvservice",
"userDirectory": "DOMAIN",
"userDirectoryConnectorName": "",
"name": "qvservice",
"privileges": null
},
"name": "Snowflake_no_encrypted (domain_qvservice)",
"connectionstring": "CUSTOM CONNECT TO \"provider=QvOdbcConnectorPackage.exe;driver=snowflake;server=JIPCXQB-ATTUNITY_PARTNER.snowflakecomputing.com;po
rt=443;database=testDATABASE;schema=PUBLIC;warehouse=MONO_TEST;validateSessionParam=false;role=SYSADMIN;authenticator=snowflake_jwt;allowNonSelectQueries=fa
lse;QueryTimeout=600;useBulkReader=true;maxStringLength=4096;\"",
"type": "QvOdbcConnectorPackage.exe",
"engineObjectId": "400af54c-9913-4e49-90fb-d6e9fecbe3f6",
"username": "jmxxxxx ",
"password": "PRIV_KEY_FILE%2rsa_key.p8%%2LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0xxxxxxxxxxxxxxx..",
"logOn": 1,
"architecture": 0,
"tags": [
],
"privileges": null,
"schemaPath": "DataConnection"
}
How to create a Qlik Oracle Wallet ODBC connection via the QRS Rest API