-
Notifications
You must be signed in to change notification settings - Fork 5
/
component.json
397 lines (397 loc) · 17.9 KB
/
component.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
{
"title": "REST API V2",
"version": "2.1.0",
"description": "A generic connector for accessing HTTP and REST APIs .",
"authClientTypes": [
"oauth2",
"basic",
"api_key",
"noauth"
],
"docsUrl": "https://github.com/elasticio/rest-api-component",
"credentials": {
"fields": {
"auth": {
"required": false,
"viewClass": "HTTPAuthView"
}
}
},
"triggers": {
"httpRequestAxiosTrigger": {
"type": "polling",
"main": "./src/triggers/httpRequest.js",
"title": "HTTP Request (Axios Library)",
"help": {
"description": "Sends a GET, POST, PUT, or DELETE HTTP request and parses the response back to the flow.",
"link": "/components/rest-api/index.html#http-request-axios"
},
"metadata": {
"out": "./src/schemas/requestSchema.out.json"
},
"fields": {
"reader": {
"label": "REST API",
"required": true,
"viewClass": "RESTAPIView",
"order": 95
},
"errorPolicy": {
"label": "Error Handling Policy",
"viewClass": "SelectView",
"placeholder": "Retry by component",
"model": {
"byComponent": "Retry by component",
"rebound": "Use rebound functionality",
"throwError": "Don't retry (throw error)",
"emit": "Emit error as message (don't throw errors)"
},
"help": {
"description": "Default - <b>Retry by component</b>"
},
"order": 90
},
"maxRetries": {
"label": "Maximum Retries",
"placeholder": "10",
"viewClass": "TextFieldView",
"help": {
"description": "Set the maximum number of retry attempts. This option works only when <b>Error Handling Policy</b> is set to <b><i>Retry by component</i></b>. Default and maximum value is 10."
},
"order": 85
},
"errorCodes": {
"label": "Error Codes for retry",
"placeholder": "408, 423, 429, 500-599",
"viewClass": "TextFieldView",
"help": {
"description": "A comma-separated list of codes or ranges. By default, the error handling policy is applied when you receive HTTP codes 408, 423, 429, and any codes from 500 onwards. You can override these default codes using this field.<br><br>Examples of valid entries:<br><b>Exact codes:</b> <br>401, 404, 503<br><br><b>Ranges:</b><br>400-401, 405-410, 502-509<br><br><b>Combinations:</b><br>403, 404, 500-599<br><br><b>Note:</b> You can only use codes above 299 here, and you cannot use code 401 if OAuth2 authentication is selected."
},
"order": 80
},
"downloadAsAttachment": {
"label": "Download as Attachment",
"viewClass": "CheckBoxView",
"help": {
"description": "If checked, the component will download response data to internal storage as an attachment."
},
"order": 75
},
"uploadFile": {
"label": "Upload File",
"viewClass": "CheckBoxView",
"help": {
"description": "If checked, you will be able to upload data. Two options are available:<br><br>1. For body content type <b>application/octet-stream</b>, place the URL of the file from internal or external storage directly in the \"Body\" field as a string.<br><br>2. For body content type <b>multipart/form-data</b>, use any key as a string (e.g., \"file\") and the value as an object (switch this field to \"JSONata Mode\"). One of the object keys must be \"url\" with a link to the file.<br><br>Available parameters:<br><b>* url</b> (string, required) - link to the file from internal or external storage.<br><b>* filename</b> (string, optional) - name of the file.<br><b>* knownLength</b> (number, optional) - size of the file.<br><br>Example of a valid object:<div style=\"background-color:#E7E8EB;\">{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"url\":</span> <span style=\"color:#b35e14;\">\"https://example.com/pic.jpg\"</span>,<br><span style=\"color:#1d75b3;\">\"filename\":</span> <span style=\"color:#b35e14;\">\"pic.jpg\"</span>,<br><span style=\"color:#1d75b3;\">\"knownLength\":</span> <span style=\"color:#75438a;\">15201</span></div>}</div>"
},
"order": 70
},
"noStrictSSL": {
"label": "Do Not Verify SSL Certificate (Unsafe)",
"viewClass": "CheckBoxView",
"help": {
"description": "Warning: This is an unsafe option! Check this box if you want to disable SSL certificate verification on the server."
},
"order": 65
},
"maxRedirects": {
"label": "Maximum Redirects",
"viewClass": "TextFieldView",
"help": {
"description": "Defines the maximum number of redirects to follow, default is 5. If set to 0, no redirects will be followed."
},
"order": 60
},
"delay": {
"label": "Delay in ms",
"viewClass": "TextFieldView",
"help": {
"description": "Delay the next request after the previous request. Maximum delay is 1140000 ms (19 minutes); default is 0."
},
"order": 55
},
"requestTimeoutPeriod": {
"label": "Request Timeout",
"viewClass": "TextFieldView",
"help": {
"description": "Timeout period in milliseconds while the component waits for a server response. Should be a positive integer (1-1140000); defaults to 100000 ms (100 seconds)."
},
"order": 50
},
"maxContentLength": {
"label": "Response Size Limit",
"viewClass": "TextFieldView",
"help": {
"description": "Maximum response size in bytes; maximum and default is 20MB for regular requests and 100MB for attachments (if <b>Download as Attachment</b> is checked)."
},
"order": 45
},
"maxBodyLength": {
"label": "Request Size Limit",
"viewClass": "TextFieldView",
"help": {
"description": "Maximum size of the HTTP request content in bytes; unlimited by default."
},
"order": 40
},
"responseEncoding": {
"label": "Response Encoding",
"viewClass": "TextFieldView",
"placeholder": "utf8",
"help": {
"description": "Indicates the encoding to use for decoding responses. By default, <b>utf8</b> is used, but in some cases, when you need to get data inside the message, you can use <b>base64</b>."
},
"order": 35
}
}
},
"httpRequestTrigger": {
"deprecated": true,
"main": "./lib/triggers/httpRequestTrigger.js",
"title": "HTTP Request (Request Library)",
"help": {
"description": "Will send a GET/POST/PUT/DELETE HTTP request and parse the response back to the flow",
"link": "/components/rest-api/index.html#http-request"
},
"type": "polling",
"metadata": {
"out": "./lib/schemas/requestSchema.out.json"
},
"fields": {
"reader": {
"label": "REST API",
"required": true,
"viewClass": "RESTAPIView"
},
"dontThrowErrorFlg": {
"label": "Don`t throw Error on Failed Calls",
"viewClass": "CheckBoxView"
},
"splitResult": {
"label": "Split Result if it is an Array",
"viewClass": "CheckBoxView",
"note": "After making the request, and applying the above JSONata expression, if the result is an array and this box is checked, we will emit one message for each element of the array."
},
"enableRebound": {
"label": "Retry on failure",
"viewClass": "CheckBoxView"
},
"noStrictSSL": {
"label": "Do not verify SSL certificate (unsafe)",
"viewClass": "CheckBoxView"
},
"followRedirect": {
"label": "Follow redirect mode",
"viewClass": "SelectView",
"model": {
"followRedirects": "Follow redirects",
"doNotFollowRedirects": "Do not follow redirects"
},
"prompt": "Follow redirects (default)"
},
"delay": {
"label": "Delay",
"viewClass": "TextFieldView",
"note": "Delay calling the next request after the previous request. Time for the delay is calculated as `Delay`/ `Call Count` and shouldn't be more than 1140 seconds (19 minutes due to platform limitation). The `Call Count` value by default is 1. If you want to use another value, please set the `Call Count` field. "
},
"callCount": {
"label": "Call Count",
"viewClass": "TextFieldView",
"note": "Value should be set only in pair with `Delay`, defaults to 1"
},
"requestTimeoutPeriod": {
"label": "Request timeout",
"viewClass": "TextFieldView",
"note": "Timeout period in milliseconds while component waiting for server response, should be positive integer (1-1140000), defaults to 100000 (100 sec)"
}
}
}
},
"actions": {
"httpRequestAction": {
"deprecated": true,
"main": "./lib/actions/httpRequestAction.js",
"title": "HTTP Request (Request Library)",
"help": {
"description": "Will send a GET/POST/PUT/DELETE HTTP request and parse the response back to the flow",
"link": "/components/rest-api/index.html#http-request-1"
},
"metadata": {
"out": "./lib/schemas/requestSchema.out.json"
},
"fields": {
"reader": {
"label": "REST API",
"required": true,
"viewClass": "RESTAPIView"
},
"dontThrowErrorFlg": {
"label": "Don`t throw Error on Failed Calls",
"viewClass": "CheckBoxView"
},
"splitResult": {
"label": "Split Result if it is an Array",
"viewClass": "CheckBoxView",
"note": "After making the request, and applying the above JSONata expression, if the result is an array and this box is checked, we will emit one message for each element of the array."
},
"enableRebound": {
"label": "Retry on failure",
"viewClass": "CheckBoxView"
},
"noStrictSSL": {
"label": "Do not verify SSL certificate (unsafe)",
"viewClass": "CheckBoxView",
"note": "Unsafe option! Check it if you want to disable SSL certificate verification on the server"
},
"followRedirect": {
"label": "Follow redirect mode",
"viewClass": "SelectView",
"model": {
"followRedirects": "Follow redirects",
"doNotFollowRedirects": "Do not follow redirects"
},
"prompt": "Follow redirects (default)"
},
"delay": {
"label": "Delay",
"viewClass": "TextFieldView",
"note": "Delay calling the next request after the previous request. Time for the delay is calculated as `Delay`/ `Call Count` and shouldn't be more than 1140 seconds (19 minutes due to platform limitation). The `Call Count` value by default is 1. If you want to use another value, please set the `Call Count` field. "
},
"callCount": {
"label": "Call Count",
"viewClass": "TextFieldView",
"note": "Value should be set only in pair with `Delay`, defaults to 1"
},
"requestTimeoutPeriod": {
"label": "Request timeout",
"viewClass": "TextFieldView",
"note": "Timeout period in milliseconds while component waiting for server response, should be positive integer (1-1140000), defaults to 100000 (100 sec)"
}
}
},
"httpRequestAxios": {
"main": "./src/actions/httpRequest.js",
"title": "HTTP Request (Axios Library)",
"help": {
"description": "Sends a GET, POST, PUT, or DELETE HTTP request and parses the response back to the flow.",
"link": "/components/rest-api/index.html#http-request-axios"
},
"metadata": {
"out": "./src/schemas/requestSchema.out.json"
},
"fields": {
"reader": {
"label": "REST API",
"required": true,
"viewClass": "RESTAPIView",
"order": 95
},
"errorPolicy": {
"label": "Error Handling Policy",
"viewClass": "SelectView",
"placeholder": "Retry by component",
"model": {
"byComponent": "Retry by component",
"rebound": "Use rebound functionality",
"throwError": "Don't retry (throw error)",
"emit": "Emit error as message (don't throw errors)"
},
"help": {
"description": "Default - <b>Retry by component</b>"
},
"order": 90
},
"maxRetries": {
"label": "Maximum Retries",
"placeholder": "10",
"viewClass": "TextFieldView",
"help": {
"description": "Set the maximum number of retry attempts. This option works only when <b>Error Handling Policy</b> is set to <b><i>Retry by component</i></b>. Default and maximum value is 10."
},
"order": 85
},
"errorCodes": {
"label": "Error Codes for retry",
"placeholder": "408, 423, 429, 500-599",
"viewClass": "TextFieldView",
"help": {
"description": "A comma-separated list of codes or ranges. By default, the error handling policy is applied when you receive HTTP codes 408, 423, 429, and any codes from 500 onwards. You can override these default codes using this field.<br><br>Examples of valid entries:<br><b>Exact codes:</b> <br>401, 404, 503<br><br><b>Ranges:</b><br>400-401, 405-410, 502-509<br><br><b>Combinations:</b><br>403, 404, 500-599<br><br><b>Note:</b> You can only use codes above 299 here, and you cannot use code 401 if OAuth2 authentication is selected."
},
"order": 80
},
"downloadAsAttachment": {
"label": "Download as Attachment",
"viewClass": "CheckBoxView",
"help": {
"description": "If checked, the component will download response data to internal storage as an attachment."
},
"order": 75
},
"uploadFile": {
"label": "Upload File",
"viewClass": "CheckBoxView",
"help": {
"description": "If checked, you will be able to upload data. Two options are available:<br><br>1. For body content type <b>application/octet-stream</b>, place the URL of the file from internal or external storage directly in the \"Body\" field as a string.<br><br>2. For body content type <b>multipart/form-data</b>, use any key as a string (e.g., \"file\") and the value as an object (switch this field to \"JSONata Mode\"). One of the object keys must be \"url\" with a link to the file.<br><br>Available parameters:<br><b>* url</b> (string, required) - link to the file from internal or external storage.<br><b>* filename</b> (string, optional) - name of the file.<br><b>* knownLength</b> (number, optional) - size of the file.<br><br>Example of a valid object:<div style=\"background-color:#E7E8EB;\">{<div style=\"margin-left:1em;\"><span style=\"color:#1d75b3;\">\"url\":</span> <span style=\"color:#b35e14;\">\"https://example.com/pic.jpg\"</span>,<br><span style=\"color:#1d75b3;\">\"filename\":</span> <span style=\"color:#b35e14;\">\"pic.jpg\"</span>,<br><span style=\"color:#1d75b3;\">\"knownLength\":</span> <span style=\"color:#75438a;\">15201</span></div>}</div>"
},
"order": 70
},
"noStrictSSL": {
"label": "Do Not Verify SSL Certificate (Unsafe)",
"viewClass": "CheckBoxView",
"help": {
"description": "Warning: This is an unsafe option! Check this box if you want to disable SSL certificate verification on the server."
},
"order": 65
},
"maxRedirects": {
"label": "Maximum Redirects",
"viewClass": "TextFieldView",
"help": {
"description": "Defines the maximum number of redirects to follow, default is 5. If set to 0, no redirects will be followed."
},
"order": 60
},
"delay": {
"label": "Delay in ms",
"viewClass": "TextFieldView",
"help": {
"description": "Delay the next request after the previous request. Maximum delay is 1140000 ms (19 minutes); default is 0."
},
"order": 55
},
"requestTimeoutPeriod": {
"label": "Request Timeout",
"viewClass": "TextFieldView",
"help": {
"description": "Timeout period in milliseconds while the component waits for a server response. Should be a positive integer (1-1140000); defaults to 100000 ms (100 seconds)."
},
"order": 50
},
"maxContentLength": {
"label": "Response Size Limit",
"viewClass": "TextFieldView",
"help": {
"description": "Maximum response size in bytes; maximum and default is 20MB for regular requests and 100MB for attachments (if <b>Download as Attachment</b> is checked)."
},
"order": 45
},
"maxBodyLength": {
"label": "Request Size Limit",
"viewClass": "TextFieldView",
"help": {
"description": "Maximum size of the HTTP request content in bytes; unlimited by default."
},
"order": 40
},
"responseEncoding": {
"label": "Response Encoding",
"viewClass": "TextFieldView",
"placeholder": "utf8",
"help": {
"description": "Indicates the encoding to use for decoding responses. By default, <b>utf8</b> is used, but in some cases, when you need to get data inside the message, you can use <b>base64</b>."
},
"order": 35
}
}
}
}
}