@algolia/n8n-nodes-algolia 0.5.2 → 0.7.0

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.
@@ -0,0 +1,666 @@
1
+ {
2
+ "openapi": "3.0.2",
3
+ "info": {
4
+ "title": "Personalization API",
5
+ "description": "The Personalization API lets you access user profiles built from the personalization strategy.\n\n## Base URLs\n\nThe base URLs for requests to the Personalization API are:\n\n- `https://personalization.us.algolia.com`\n- `https://personalization.eu.algolia.com`\n\nUse the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics).\n\n**All requests must use HTTPS.**\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint's reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Response status and errors\n\nThe Personalization API returns JSON responses.\nSince JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\n## Rate limiting\n\nWhen making requests to the Personalization API, you are limited to 40 API calls per second per application.\n\nThe following headers provide information about your current limit:\n\n- `x-ratelimit-limit`: The number of requests allowed every second.\n- `x-ratelimit-remaining`: The number of requests remaining in the current\nsecond period.\n- `x-ratelimit-reset`: [Unix timestamp](https://www.unixtimestamp.com) of\nthe next time period.\n\n## Version\n\nThe current version of the Personalization API is version 1, as indicated by the `/1/` in each endpoint's URL.\n",
6
+ "version": "1.0.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://personalization.{region}.algolia.com",
11
+ "variables": {
12
+ "region": {
13
+ "description": "The region where your Algolia application is hosted.",
14
+ "enum": ["us", "eu"],
15
+ "default": "us"
16
+ }
17
+ }
18
+ }
19
+ ],
20
+ "security": [
21
+ {
22
+ "applicationId": [],
23
+ "apiKey": []
24
+ }
25
+ ],
26
+ "tags": [
27
+ {
28
+ "name": "profiles",
29
+ "x-displayName": "Profiles",
30
+ "description": "User profiles represent the affinities each user profile has for the different facets in your index.\nThe more a user viewed and clicked search results with a specific facet,\nthe higher the affinity for that facet.\n"
31
+ },
32
+ {
33
+ "name": "strategies",
34
+ "x-displayName": "Strategies",
35
+ "description": "The personalization strategy defines how personalization should affect the search results,\nand how much each facet and event type impact the personalization.\n"
36
+ }
37
+ ],
38
+ "externalDocs": {
39
+ "url": "https://www.algolia.com/doc/guides/personalization/what-is-personalization",
40
+ "description": "Algolia Personalization."
41
+ },
42
+ "paths": {
43
+ "/{path}": {
44
+ "get": {
45
+ "operationId": "customGet",
46
+ "summary": "Send requests to the Algolia REST API",
47
+ "description": "This method lets you send requests to the Algolia REST API.",
48
+ "parameters": [
49
+ {
50
+ "$ref": "#/components/parameters/PathInPath"
51
+ },
52
+ {
53
+ "$ref": "#/components/parameters/Parameters"
54
+ }
55
+ ],
56
+ "responses": {
57
+ "200": {
58
+ "description": "OK",
59
+ "content": {
60
+ "application/json": {
61
+ "schema": {
62
+ "type": "object"
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "400": {
68
+ "$ref": "#/components/responses/BadRequest"
69
+ },
70
+ "402": {
71
+ "$ref": "#/components/responses/FeatureNotEnabled"
72
+ },
73
+ "403": {
74
+ "$ref": "#/components/responses/MethodNotAllowed"
75
+ },
76
+ "404": {
77
+ "$ref": "#/components/responses/IndexNotFound"
78
+ }
79
+ }
80
+ },
81
+ "post": {
82
+ "operationId": "customPost",
83
+ "requestBody": {
84
+ "description": "Parameters to send with the custom request.",
85
+ "content": {
86
+ "application/json": {
87
+ "schema": {
88
+ "type": "object"
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "summary": "Send requests to the Algolia REST API",
94
+ "description": "This method lets you send requests to the Algolia REST API.",
95
+ "parameters": [
96
+ {
97
+ "$ref": "#/components/parameters/PathInPath"
98
+ },
99
+ {
100
+ "$ref": "#/components/parameters/Parameters"
101
+ }
102
+ ],
103
+ "responses": {
104
+ "200": {
105
+ "description": "OK",
106
+ "content": {
107
+ "application/json": {
108
+ "schema": {
109
+ "type": "object"
110
+ }
111
+ }
112
+ }
113
+ },
114
+ "400": {
115
+ "$ref": "#/components/responses/BadRequest"
116
+ },
117
+ "402": {
118
+ "$ref": "#/components/responses/FeatureNotEnabled"
119
+ },
120
+ "403": {
121
+ "$ref": "#/components/responses/MethodNotAllowed"
122
+ },
123
+ "404": {
124
+ "$ref": "#/components/responses/IndexNotFound"
125
+ }
126
+ }
127
+ },
128
+ "put": {
129
+ "operationId": "customPut",
130
+ "requestBody": {
131
+ "description": "Parameters to send with the custom request.",
132
+ "content": {
133
+ "application/json": {
134
+ "schema": {
135
+ "type": "object"
136
+ }
137
+ }
138
+ }
139
+ },
140
+ "summary": "Send requests to the Algolia REST API",
141
+ "description": "This method lets you send requests to the Algolia REST API.",
142
+ "parameters": [
143
+ {
144
+ "$ref": "#/components/parameters/PathInPath"
145
+ },
146
+ {
147
+ "$ref": "#/components/parameters/Parameters"
148
+ }
149
+ ],
150
+ "responses": {
151
+ "200": {
152
+ "description": "OK",
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "type": "object"
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "400": {
162
+ "$ref": "#/components/responses/BadRequest"
163
+ },
164
+ "402": {
165
+ "$ref": "#/components/responses/FeatureNotEnabled"
166
+ },
167
+ "403": {
168
+ "$ref": "#/components/responses/MethodNotAllowed"
169
+ },
170
+ "404": {
171
+ "$ref": "#/components/responses/IndexNotFound"
172
+ }
173
+ }
174
+ },
175
+ "delete": {
176
+ "operationId": "customDelete",
177
+ "summary": "Send requests to the Algolia REST API",
178
+ "description": "This method lets you send requests to the Algolia REST API.",
179
+ "parameters": [
180
+ {
181
+ "$ref": "#/components/parameters/PathInPath"
182
+ },
183
+ {
184
+ "$ref": "#/components/parameters/Parameters"
185
+ }
186
+ ],
187
+ "responses": {
188
+ "200": {
189
+ "description": "OK",
190
+ "content": {
191
+ "application/json": {
192
+ "schema": {
193
+ "type": "object"
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "400": {
199
+ "$ref": "#/components/responses/BadRequest"
200
+ },
201
+ "402": {
202
+ "$ref": "#/components/responses/FeatureNotEnabled"
203
+ },
204
+ "403": {
205
+ "$ref": "#/components/responses/MethodNotAllowed"
206
+ },
207
+ "404": {
208
+ "$ref": "#/components/responses/IndexNotFound"
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "/1/profiles/personalization/{userToken}": {
214
+ "get": {
215
+ "tags": ["profiles"],
216
+ "operationId": "getUserTokenProfile",
217
+ "x-acl": ["recommendation"],
218
+ "summary": "Retrieve a user profile",
219
+ "description": "Retrieves a user profile and their affinities for different facets.",
220
+ "parameters": [
221
+ {
222
+ "$ref": "#/components/parameters/UserToken"
223
+ }
224
+ ],
225
+ "responses": {
226
+ "200": {
227
+ "description": "OK",
228
+ "headers": {
229
+ "x-ratelimit-limit": {
230
+ "$ref": "#/components/headers/x-ratelimit-limit"
231
+ },
232
+ "x-ratelimit-remaining": {
233
+ "$ref": "#/components/headers/x-ratelimit-remaining"
234
+ },
235
+ "x-ratelimit-reset": {
236
+ "$ref": "#/components/headers/x-ratelimit-reset"
237
+ }
238
+ },
239
+ "content": {
240
+ "application/json": {
241
+ "schema": {
242
+ "title": "getUserTokenResponse",
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": ["userToken", "scores", "lastEventAt"],
246
+ "properties": {
247
+ "userToken": {
248
+ "$ref": "#/components/schemas/userToken"
249
+ },
250
+ "lastEventAt": {
251
+ "type": "string",
252
+ "description": "Date and time of the last event from this user, in RFC 3339 format."
253
+ },
254
+ "scores": {
255
+ "type": "object",
256
+ "description": "Scores for different facet values.\n\nScores represent the user affinity for a user profile towards specific facet values,\ngiven the personalization strategy and past events.\n"
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "400": {
264
+ "$ref": "#/components/responses/BadRequest"
265
+ },
266
+ "402": {
267
+ "$ref": "#/components/responses/FeatureNotEnabled"
268
+ },
269
+ "403": {
270
+ "$ref": "#/components/responses/MethodNotAllowed"
271
+ },
272
+ "404": {
273
+ "$ref": "#/components/responses/IndexNotFound"
274
+ }
275
+ }
276
+ }
277
+ },
278
+ "/1/profiles/{userToken}": {
279
+ "delete": {
280
+ "tags": ["profiles"],
281
+ "operationId": "deleteUserProfile",
282
+ "x-acl": ["recommendation"],
283
+ "summary": "Delete a user profile",
284
+ "description": "Deletes a user profile.\n\nThe response includes a date and time when the user profile can safely be considered deleted.\n",
285
+ "parameters": [
286
+ {
287
+ "$ref": "#/components/parameters/UserToken"
288
+ }
289
+ ],
290
+ "responses": {
291
+ "200": {
292
+ "description": "OK",
293
+ "headers": {
294
+ "x-ratelimit-limit": {
295
+ "$ref": "#/components/headers/x-ratelimit-limit"
296
+ },
297
+ "x-ratelimit-remaining": {
298
+ "$ref": "#/components/headers/x-ratelimit-remaining"
299
+ },
300
+ "x-ratelimit-reset": {
301
+ "$ref": "#/components/headers/x-ratelimit-reset"
302
+ }
303
+ },
304
+ "content": {
305
+ "application/json": {
306
+ "schema": {
307
+ "title": "deleteUserProfileResponse",
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "required": ["userToken", "deletedUntil"],
311
+ "properties": {
312
+ "userToken": {
313
+ "$ref": "#/components/schemas/userToken"
314
+ },
315
+ "deletedUntil": {
316
+ "type": "string",
317
+ "description": "Date and time when the user profile can be safely considered to be deleted.\nAny events received after the `deletedUntil` date start a new user profile.\n"
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ },
324
+ "400": {
325
+ "$ref": "#/components/responses/BadRequest"
326
+ },
327
+ "402": {
328
+ "$ref": "#/components/responses/FeatureNotEnabled"
329
+ },
330
+ "403": {
331
+ "$ref": "#/components/responses/MethodNotAllowed"
332
+ },
333
+ "404": {
334
+ "$ref": "#/components/responses/IndexNotFound"
335
+ }
336
+ }
337
+ }
338
+ },
339
+ "/1/strategies/personalization": {
340
+ "get": {
341
+ "tags": ["strategies"],
342
+ "operationId": "getPersonalizationStrategy",
343
+ "x-acl": ["recommendation"],
344
+ "summary": "Retrieve the personalization strategy",
345
+ "description": "Retrieves the current personalization strategy.",
346
+ "responses": {
347
+ "200": {
348
+ "description": "OK",
349
+ "headers": {
350
+ "x-ratelimit-limit": {
351
+ "$ref": "#/components/headers/x-ratelimit-limit"
352
+ },
353
+ "x-ratelimit-remaining": {
354
+ "$ref": "#/components/headers/x-ratelimit-remaining"
355
+ },
356
+ "x-ratelimit-reset": {
357
+ "$ref": "#/components/headers/x-ratelimit-reset"
358
+ }
359
+ },
360
+ "content": {
361
+ "application/json": {
362
+ "schema": {
363
+ "$ref": "#/components/schemas/personalizationStrategyParams"
364
+ }
365
+ }
366
+ }
367
+ },
368
+ "400": {
369
+ "$ref": "#/components/responses/BadRequest"
370
+ },
371
+ "402": {
372
+ "$ref": "#/components/responses/FeatureNotEnabled"
373
+ },
374
+ "403": {
375
+ "$ref": "#/components/responses/MethodNotAllowed"
376
+ },
377
+ "404": {
378
+ "$ref": "#/components/responses/IndexNotFound"
379
+ }
380
+ }
381
+ },
382
+ "post": {
383
+ "tags": ["strategies"],
384
+ "operationId": "setPersonalizationStrategy",
385
+ "x-acl": ["recommendation"],
386
+ "summary": "Define the personalization strategy",
387
+ "description": "Creates a new personalization strategy.",
388
+ "requestBody": {
389
+ "required": true,
390
+ "content": {
391
+ "application/json": {
392
+ "schema": {
393
+ "$ref": "#/components/schemas/personalizationStrategyParams"
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "responses": {
399
+ "200": {
400
+ "description": "OK",
401
+ "content": {
402
+ "application/json": {
403
+ "schema": {
404
+ "title": "setPersonalizationStrategyResponse",
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "required": ["message"],
408
+ "properties": {
409
+ "message": {
410
+ "type": "string",
411
+ "description": "A message confirming the strategy update.",
412
+ "example": "Strategy was successfully updated."
413
+ }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ },
419
+ "400": {
420
+ "$ref": "#/components/responses/BadRequest"
421
+ },
422
+ "402": {
423
+ "$ref": "#/components/responses/FeatureNotEnabled"
424
+ },
425
+ "403": {
426
+ "$ref": "#/components/responses/MethodNotAllowed"
427
+ },
428
+ "404": {
429
+ "$ref": "#/components/responses/IndexNotFound"
430
+ }
431
+ }
432
+ }
433
+ },
434
+ "/setClientApiKey": {
435
+ "get": {
436
+ "x-helper": true,
437
+ "x-asynchronous-helper": false,
438
+ "tags": ["Api Key"],
439
+ "operationId": "setClientApiKey",
440
+ "summary": "Switch the API key used to authenticate requests",
441
+ "description": "Switch the API key used to authenticate requests.\n",
442
+ "parameters": [
443
+ {
444
+ "in": "query",
445
+ "name": "apiKey",
446
+ "description": "API key to be used from now on.",
447
+ "required": true,
448
+ "schema": {
449
+ "type": "string"
450
+ }
451
+ }
452
+ ],
453
+ "responses": {
454
+ "204": {
455
+ "description": "No content."
456
+ }
457
+ }
458
+ }
459
+ }
460
+ },
461
+ "components": {
462
+ "securitySchemes": {
463
+ "applicationId": {
464
+ "type": "apiKey",
465
+ "in": "header",
466
+ "name": "x-algolia-application-id",
467
+ "description": "Your Algolia application ID."
468
+ },
469
+ "apiKey": {
470
+ "type": "apiKey",
471
+ "in": "header",
472
+ "name": "x-algolia-api-key",
473
+ "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n"
474
+ }
475
+ },
476
+ "parameters": {
477
+ "PathInPath": {
478
+ "name": "path",
479
+ "in": "path",
480
+ "description": "Path of the endpoint, for example `1/newFeature`.",
481
+ "required": true,
482
+ "schema": {
483
+ "type": "string",
484
+ "example": "/keys"
485
+ }
486
+ },
487
+ "Parameters": {
488
+ "name": "parameters",
489
+ "in": "query",
490
+ "description": "Query parameters to apply to the current query.",
491
+ "schema": {
492
+ "type": "object",
493
+ "additionalProperties": true
494
+ }
495
+ },
496
+ "UserToken": {
497
+ "name": "userToken",
498
+ "in": "path",
499
+ "required": true,
500
+ "description": "Unique identifier representing a user for which to fetch the personalization profile.",
501
+ "schema": {
502
+ "$ref": "#/components/schemas/userToken"
503
+ }
504
+ }
505
+ },
506
+ "schemas": {
507
+ "ErrorBase": {
508
+ "description": "Error.",
509
+ "type": "object",
510
+ "x-keep-model": true,
511
+ "additionalProperties": true,
512
+ "properties": {
513
+ "message": {
514
+ "type": "string",
515
+ "example": "Invalid Application-Id or API-Key"
516
+ }
517
+ }
518
+ },
519
+ "userToken": {
520
+ "type": "string",
521
+ "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).\n",
522
+ "example": "test-user-123",
523
+ "x-categories": ["Personalization"]
524
+ },
525
+ "score": {
526
+ "type": "integer",
527
+ "description": "Event score."
528
+ },
529
+ "EventType": {
530
+ "title": "eventType",
531
+ "type": "string",
532
+ "description": "Event type.",
533
+ "enum": ["click", "conversion", "view"]
534
+ },
535
+ "eventsScoring": {
536
+ "type": "object",
537
+ "additionalProperties": false,
538
+ "required": ["score", "eventName", "eventType"],
539
+ "properties": {
540
+ "score": {
541
+ "$ref": "#/components/schemas/score"
542
+ },
543
+ "eventName": {
544
+ "type": "string",
545
+ "description": "Event name."
546
+ },
547
+ "eventType": {
548
+ "$ref": "#/components/schemas/EventType"
549
+ }
550
+ }
551
+ },
552
+ "facetsScoring": {
553
+ "type": "object",
554
+ "additionalProperties": false,
555
+ "required": ["score", "facetName"],
556
+ "properties": {
557
+ "score": {
558
+ "$ref": "#/components/schemas/score"
559
+ },
560
+ "facetName": {
561
+ "type": "string",
562
+ "description": "Facet attribute name."
563
+ }
564
+ }
565
+ },
566
+ "personalizationStrategyParams": {
567
+ "type": "object",
568
+ "additionalProperties": false,
569
+ "required": ["eventsScoring", "facetsScoring", "personalizationImpact"],
570
+ "properties": {
571
+ "eventsScoring": {
572
+ "type": "array",
573
+ "description": "Scores associated with each event.\n\nThe higher the scores, the higher the impact of those events on the personalization of search results.\n",
574
+ "items": {
575
+ "$ref": "#/components/schemas/eventsScoring"
576
+ }
577
+ },
578
+ "facetsScoring": {
579
+ "type": "array",
580
+ "description": "Scores associated with each facet.\n\nThe higher the scores, the higher the impact of those events on the personalization of search results.\n",
581
+ "items": {
582
+ "$ref": "#/components/schemas/facetsScoring"
583
+ }
584
+ },
585
+ "personalizationImpact": {
586
+ "type": "integer",
587
+ "minimum": 0,
588
+ "maximum": 100,
589
+ "description": "Impact of personalization on the search results.\n\nIf set to 0, personalization has no impact on the search results.\n"
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "responses": {
595
+ "BadRequest": {
596
+ "description": "Bad request or request arguments.",
597
+ "content": {
598
+ "application/json": {
599
+ "schema": {
600
+ "$ref": "#/components/schemas/ErrorBase"
601
+ }
602
+ }
603
+ }
604
+ },
605
+ "FeatureNotEnabled": {
606
+ "description": "This feature is not enabled on your Algolia account.",
607
+ "content": {
608
+ "application/json": {
609
+ "schema": {
610
+ "$ref": "#/components/schemas/ErrorBase"
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "MethodNotAllowed": {
616
+ "description": "Method not allowed with this API key.",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/ErrorBase"
621
+ }
622
+ }
623
+ }
624
+ },
625
+ "IndexNotFound": {
626
+ "description": "Index not found.",
627
+ "content": {
628
+ "application/json": {
629
+ "schema": {
630
+ "$ref": "#/components/schemas/ErrorBase"
631
+ }
632
+ }
633
+ }
634
+ }
635
+ },
636
+ "headers": {
637
+ "x-ratelimit-limit": {
638
+ "description": "Number of allowed requests per one minute.",
639
+ "example": 100,
640
+ "schema": {
641
+ "type": "integer"
642
+ }
643
+ },
644
+ "x-ratelimit-remaining": {
645
+ "description": "Number of remaining requests in the current period.",
646
+ "example": 99,
647
+ "schema": {
648
+ "type": "integer"
649
+ }
650
+ },
651
+ "x-ratelimit-reset": {
652
+ "description": "Timstamp when the rate limit will reset, measured in seconds since the Unix epoch.",
653
+ "example": 1710682486,
654
+ "schema": {
655
+ "type": "integer"
656
+ }
657
+ }
658
+ }
659
+ },
660
+ "x-tagGroups": [
661
+ {
662
+ "name": "General",
663
+ "tags": ["profiles", "strategies"]
664
+ }
665
+ ]
666
+ }