n8n-nodes-qlik-cloud 1.2.1 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This package contains an n8n community node for integrating with **Qlik Cloud**
|
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
7
|
-
My goal is to deliver a complete integration with the Qlik Cloud REST APIs, covering all available endpoints. This is still a work in progress because Qlik Cloud continues to add new endpoints and methods. As of 12/29/2025, the integration includes 564 methods across 64 endpoints, and
|
|
7
|
+
My goal is to deliver a complete integration with the Qlik Cloud REST APIs, covering all available endpoints. This is still a work in progress because Qlik Cloud continues to add new endpoints and methods. As of 12/29/2025, the integration includes 564 methods across 64 endpoints, and 98 calls were already implemented.
|
|
8
8
|
|
|
9
9
|
- [ ] /apis/rest/.well-known: 1
|
|
10
10
|
- [ ] /apis/rest/api-keys: 7
|
|
@@ -887,9 +887,44 @@ class QlikCloud {
|
|
|
887
887
|
{
|
|
888
888
|
name: 'qlikCloudApi',
|
|
889
889
|
required: true,
|
|
890
|
+
displayOptions: {
|
|
891
|
+
show: {
|
|
892
|
+
authentication: [
|
|
893
|
+
'apiToken',
|
|
894
|
+
],
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
name: 'qlikCloudOAuth2Api',
|
|
900
|
+
required: true,
|
|
901
|
+
displayOptions: {
|
|
902
|
+
show: {
|
|
903
|
+
authentication: [
|
|
904
|
+
'oAuth2',
|
|
905
|
+
],
|
|
906
|
+
},
|
|
907
|
+
},
|
|
890
908
|
},
|
|
891
909
|
],
|
|
892
910
|
properties: [
|
|
911
|
+
{
|
|
912
|
+
displayName: 'Authentication',
|
|
913
|
+
name: 'authentication',
|
|
914
|
+
type: 'options',
|
|
915
|
+
options: [
|
|
916
|
+
{
|
|
917
|
+
name: 'API Token',
|
|
918
|
+
value: 'apiToken',
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
name: 'OAuth2',
|
|
922
|
+
value: 'oAuth2',
|
|
923
|
+
},
|
|
924
|
+
],
|
|
925
|
+
default: 'apiToken',
|
|
926
|
+
description: 'Choose how to authenticate to Qlik Cloud',
|
|
927
|
+
},
|
|
893
928
|
{
|
|
894
929
|
displayName: 'Resource',
|
|
895
930
|
name: 'resource',
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.qlikApiRequest = qlikApiRequest;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
5
|
async function qlikApiRequest(method, endpoint, body, qs, returnFullResponse = false, extraOptions = {}) {
|
|
6
|
-
const
|
|
6
|
+
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
|
7
|
+
const credentialType = authenticationMethod === 'oAuth2' ? 'qlikCloudOAuth2Api' : 'qlikCloudApi';
|
|
8
|
+
const credentials = await this.getCredentials(credentialType);
|
|
7
9
|
if (!credentials) {
|
|
8
10
|
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
9
|
-
message:
|
|
11
|
+
message: `No credentials found for Qlik Cloud API (${authenticationMethod === 'oAuth2' ? 'OAuth2' : 'API Token'})`,
|
|
10
12
|
});
|
|
11
13
|
}
|
|
12
14
|
const baseUrl = credentials.baseUrl.replace(/\/+$/, '');
|
|
13
|
-
const accessToken = credentials.accessToken;
|
|
14
15
|
const url = `${baseUrl}${endpoint.startsWith('/') ? endpoint : `/${endpoint}`}`;
|
|
15
|
-
const
|
|
16
|
-
Authorization: `Bearer ${accessToken}`,
|
|
16
|
+
const baseHeaders = {
|
|
17
17
|
'Content-Type': 'application/json',
|
|
18
18
|
...(extraOptions.headers || {}),
|
|
19
19
|
};
|
|
@@ -21,15 +21,25 @@ async function qlikApiRequest(method, endpoint, body, qs, returnFullResponse = f
|
|
|
21
21
|
method,
|
|
22
22
|
url,
|
|
23
23
|
qs,
|
|
24
|
-
json: extraOptions.json ?? true,
|
|
25
24
|
returnFullResponse,
|
|
26
25
|
...extraOptions,
|
|
27
|
-
|
|
26
|
+
json: extraOptions.json ?? true,
|
|
27
|
+
headers: baseHeaders,
|
|
28
28
|
};
|
|
29
|
+
if (authenticationMethod === 'apiToken') {
|
|
30
|
+
const accessToken = credentials.accessToken;
|
|
31
|
+
options.headers = {
|
|
32
|
+
Authorization: `Bearer ${accessToken}`,
|
|
33
|
+
...baseHeaders,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
29
36
|
if (body !== undefined) {
|
|
30
37
|
options.body = body;
|
|
31
38
|
}
|
|
32
39
|
try {
|
|
40
|
+
if (authenticationMethod === 'oAuth2') {
|
|
41
|
+
return await this.helpers.httpRequestWithAuthentication.call(this, credentialType, options);
|
|
42
|
+
}
|
|
33
43
|
return await this.helpers.httpRequest(options);
|
|
34
44
|
}
|
|
35
45
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1240,9 +1240,44 @@ export class QlikCloud implements INodeType {
|
|
|
1240
1240
|
{
|
|
1241
1241
|
name: 'qlikCloudApi',
|
|
1242
1242
|
required: true,
|
|
1243
|
+
displayOptions: {
|
|
1244
|
+
show: {
|
|
1245
|
+
authentication: [
|
|
1246
|
+
'apiToken',
|
|
1247
|
+
],
|
|
1248
|
+
},
|
|
1249
|
+
},
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
name: 'qlikCloudOAuth2Api',
|
|
1253
|
+
required: true,
|
|
1254
|
+
displayOptions: {
|
|
1255
|
+
show: {
|
|
1256
|
+
authentication: [
|
|
1257
|
+
'oAuth2',
|
|
1258
|
+
],
|
|
1259
|
+
},
|
|
1260
|
+
},
|
|
1243
1261
|
},
|
|
1244
1262
|
],
|
|
1245
1263
|
properties: [
|
|
1264
|
+
{
|
|
1265
|
+
displayName: 'Authentication',
|
|
1266
|
+
name: 'authentication',
|
|
1267
|
+
type: 'options',
|
|
1268
|
+
options: [
|
|
1269
|
+
{
|
|
1270
|
+
name: 'API Token',
|
|
1271
|
+
value: 'apiToken',
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
name: 'OAuth2',
|
|
1275
|
+
value: 'oAuth2',
|
|
1276
|
+
},
|
|
1277
|
+
],
|
|
1278
|
+
default: 'apiToken',
|
|
1279
|
+
description: 'Choose how to authenticate to Qlik Cloud',
|
|
1280
|
+
},
|
|
1246
1281
|
{
|
|
1247
1282
|
displayName: 'Resource',
|
|
1248
1283
|
name: 'resource',
|
|
@@ -14,20 +14,20 @@ export async function qlikApiRequest(
|
|
|
14
14
|
returnFullResponse: boolean = false,
|
|
15
15
|
extraOptions: Partial<IHttpRequestOptions> = {},
|
|
16
16
|
): Promise<any> {
|
|
17
|
-
const
|
|
17
|
+
const authenticationMethod = this.getNodeParameter('authentication', 0) as 'apiToken' | 'oAuth2';
|
|
18
|
+
const credentialType = authenticationMethod === 'oAuth2' ? 'qlikCloudOAuth2Api' : 'qlikCloudApi';
|
|
19
|
+
const credentials = await this.getCredentials(credentialType);
|
|
18
20
|
|
|
19
21
|
if (!credentials) {
|
|
20
22
|
throw new NodeApiError(this.getNode(), {
|
|
21
|
-
message:
|
|
23
|
+
message: `No credentials found for Qlik Cloud API (${authenticationMethod === 'oAuth2' ? 'OAuth2' : 'API Token'})`,
|
|
22
24
|
} as any);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
const baseUrl = (credentials.baseUrl as string).replace(/\/+$/, '');
|
|
26
|
-
const accessToken = credentials.accessToken as string;
|
|
27
28
|
const url = `${baseUrl}${endpoint.startsWith('/') ? endpoint : `/${endpoint}`}`;
|
|
28
29
|
|
|
29
|
-
const
|
|
30
|
-
Authorization: `Bearer ${accessToken}`,
|
|
30
|
+
const baseHeaders = {
|
|
31
31
|
'Content-Type': 'application/json',
|
|
32
32
|
...(extraOptions.headers || {}),
|
|
33
33
|
};
|
|
@@ -36,17 +36,29 @@ export async function qlikApiRequest(
|
|
|
36
36
|
method,
|
|
37
37
|
url,
|
|
38
38
|
qs,
|
|
39
|
-
json: extraOptions.json ?? true,
|
|
40
39
|
returnFullResponse,
|
|
41
40
|
...extraOptions,
|
|
42
|
-
|
|
41
|
+
json: extraOptions.json ?? true,
|
|
42
|
+
headers: baseHeaders,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
if (authenticationMethod === 'apiToken') {
|
|
46
|
+
const accessToken = credentials.accessToken as string;
|
|
47
|
+
options.headers = {
|
|
48
|
+
Authorization: `Bearer ${accessToken}`,
|
|
49
|
+
...baseHeaders,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
if (body !== undefined) {
|
|
46
54
|
options.body = body;
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
try {
|
|
58
|
+
if (authenticationMethod === 'oAuth2') {
|
|
59
|
+
return await this.helpers.httpRequestWithAuthentication.call(this, credentialType, options);
|
|
60
|
+
}
|
|
61
|
+
|
|
50
62
|
return await this.helpers.httpRequest(options);
|
|
51
63
|
} catch (error) {
|
|
52
64
|
const errMessage = error instanceof Error ? error.message : typeof error === 'string' ? error : JSON.stringify(error);
|