-
Notifications
You must be signed in to change notification settings - Fork 7
Custom Configuration
The default configuration file with values is as follows:
{
hostname: '',
portNumber: 4242,
virtualProxyPrefix: "",
localCertPath: 'C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/.Local Certificates',
repoAccount: 'UserDirectory=Internal;UserId=sa_api'
}
Any of these properties can be overridden if trying to connect to a Qlik Sense Repository service that either has either a non-default setup, or if the service is running on a different machine.
Note that, when changing the localCertPath, it expects two files to be present, client.pem and client_key.pem, if you want a custom certificate name, read the 'Custom Certificates' section below.
If you want custom headers, you can send a headers section in your configuration. If this is done, ALL headers will be overwritten with the exception of X-Qlik-Xrfkey as the cross side scripting xrfkey is handled by qrs-interact.
var config = {
hostname: 'someHost.domain.com',
headers: {
'Header1': value1,
'Header2': value2
}
}
If you want a custom certificate path, there are two ways to do this, provide the full path for a certificate .pem file and a key .pem file, or provide a path to a .pfx file and a passphrase.
.pem setup
var config = {
hostname: 'someHost.domain.com',
certificates: {
certFile: 'C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/.Local Certificates/client.pem',
keyFile: 'C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/.Local Certificates/client_key.pem',
}
}
.pfx setup
var config = {
hostname: 'someHost.domain.com',
certificates: {
pfxFile: 'C:/temp/cert.pfx',
passphrase: correcthorsebatterystaple,
}
}
If you would like to change the default port number, you can use qrs-interact as follows:
var qrsInteract = require('qrs-interact');
var config = {
hostname: "machine.domain.come",
portNumber: 4244
}
var qrsInteractInstance = new qrsInteract(config);
If you would like to user custom headers, you can use qrs-interact as follows:
var qrsInteract = require('qrs-interact');
var config = {
hostname: "machine.domain.come",
headers: {
'Header1': value1,
'Header2': value2
}
}
var qrsInteractInstance = new qrsInteract(config);