losant_rest 1.16.6 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2916 -598
  3. data/docs/applicationApiTokens.md +1 -1
  4. data/docs/events.md +1 -1
  5. data/docs/notebook.md +1 -1
  6. data/docs/resourceJob.md +263 -0
  7. data/docs/resourceJobs.md +93 -0
  8. data/lib/losant_rest/application_api_tokens.rb +1 -1
  9. data/lib/losant_rest/client.rb +10 -2
  10. data/lib/losant_rest/events.rb +1 -1
  11. data/lib/losant_rest/notebook.rb +1 -1
  12. data/lib/losant_rest/resource_job.rb +326 -0
  13. data/lib/losant_rest/resource_jobs.rb +138 -0
  14. data/lib/losant_rest/version.rb +1 -1
  15. data/lib/losant_rest.rb +2 -0
  16. data/schemas/apiTokenPost.json +10 -0
  17. data/schemas/applicationCreationByTemplateResult.json +1 -9
  18. data/schemas/applicationExportPost.json +4 -0
  19. data/schemas/applicationTemplate.json +3 -0
  20. data/schemas/applicationTemplates.json +3 -0
  21. data/schemas/auditLog.json +2 -1
  22. data/schemas/auditLogFilter.json +2 -1
  23. data/schemas/auditLogs.json +2 -1
  24. data/schemas/dataTableRowInsertResult.json +2 -1
  25. data/schemas/eventPlusNewCount.json +161 -0
  26. data/schemas/experienceLinkedResources.json +33 -6
  27. data/schemas/flow.json +8 -2
  28. data/schemas/flowPatch.json +8 -2
  29. data/schemas/flowPost.json +8 -2
  30. data/schemas/flowVersion.json +25 -4
  31. data/schemas/flowVersionPost.json +8 -2
  32. data/schemas/flowVersions.json +25 -4
  33. data/schemas/flows.json +8 -2
  34. data/schemas/flowsImportPost.json +16 -4
  35. data/schemas/flowsImportResult.json +33 -6
  36. data/schemas/githubLogin.json +10 -0
  37. data/schemas/historicalSummaries.json +524 -1
  38. data/schemas/historicalSummary.json +22 -0
  39. data/schemas/importIntoApplicationOptions.json +6 -1
  40. data/schemas/importNewApplicationOptions.json +6 -1
  41. data/schemas/instance.json +12 -0
  42. data/schemas/instanceCustomNodePatch.json +8 -2
  43. data/schemas/instanceCustomNodePost.json +8 -2
  44. data/schemas/instanceOrg.json +3 -0
  45. data/schemas/instanceOrgPatch.json +4 -0
  46. data/schemas/instanceOrgPost.json +4 -0
  47. data/schemas/instanceOrgs.json +3 -0
  48. data/schemas/instanceSandbox.json +11 -0
  49. data/schemas/instanceSandboxes.json +433 -1
  50. data/schemas/instances.json +217 -1
  51. data/schemas/me.json +11 -0
  52. data/schemas/notebookExecutionLogs.json +3 -1
  53. data/schemas/org.json +11 -0
  54. data/schemas/orgs.json +11 -0
  55. data/schemas/payloadStats.json +8 -0
  56. data/schemas/resourceJob.json +86 -0
  57. data/schemas/resourceJobExecutionLogs.json +127 -0
  58. data/schemas/resourceJobExecutionOptions.json +11 -0
  59. data/schemas/resourceJobPatch.json +55 -0
  60. data/schemas/resourceJobPost.json +66 -0
  61. data/schemas/resourceJobs.json +131 -0
  62. data/schemas/samlResponse.json +10 -0
  63. data/schemas/userCredentials.json +10 -0
  64. data/schemas/userPost.json +10 -0
  65. data/schemas/validateContextError.json +4 -0
  66. data/schemas/validationErrors.json +1 -9
  67. metadata +13 -2
@@ -5,7 +5,223 @@
5
5
  "items": {
6
6
  "type": "array",
7
7
  "items": {
8
- "type": "#/definitions/instance"
8
+ "title": "Instance",
9
+ "description": "Schema for a single Instance",
10
+ "type": "object",
11
+ "properties": {
12
+ "name": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 255
16
+ },
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^[A-Fa-f\\d]{24}$"
20
+ },
21
+ "instanceId": {
22
+ "type": "string",
23
+ "pattern": "^[A-Fa-f\\d]{24}$"
24
+ },
25
+ "creationDate": {
26
+ "type": "string",
27
+ "format": "date-time"
28
+ },
29
+ "lastUpdated": {
30
+ "type": "string",
31
+ "format": "date-time"
32
+ },
33
+ "allowAuditLogging": {
34
+ "type": "boolean"
35
+ },
36
+ "reportConfigs": {
37
+ "type": "array",
38
+ "maxItems": 10,
39
+ "items": {
40
+ "type": "object",
41
+ "properties": {
42
+ "id": {
43
+ "type": "string",
44
+ "maxLength": 48
45
+ },
46
+ "cron": {
47
+ "type": "string",
48
+ "maxLength": 255
49
+ },
50
+ "timezone": {
51
+ "type": "string",
52
+ "maxLength": 255
53
+ },
54
+ "emails": {
55
+ "type": "array",
56
+ "maxItems": 10,
57
+ "items": {
58
+ "type": "string",
59
+ "format": "email",
60
+ "maxLength": 1024
61
+ }
62
+ },
63
+ "callbackUrl": {
64
+ "type": "string",
65
+ "format": "uri",
66
+ "maxLength": 1024
67
+ },
68
+ "resourceGroupBy": {
69
+ "type": "string",
70
+ "enum": [
71
+ "application",
72
+ "organization"
73
+ ]
74
+ },
75
+ "dateGroupBy": {
76
+ "type": "string",
77
+ "enum": [
78
+ "day",
79
+ "month"
80
+ ]
81
+ },
82
+ "periods": {
83
+ "type": "integer",
84
+ "minimum": 1,
85
+ "maximum": 90
86
+ },
87
+ "includeSandbox": {
88
+ "type": "boolean"
89
+ }
90
+ },
91
+ "required": [
92
+ "cron"
93
+ ],
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "limits": {
98
+ "type": "object",
99
+ "properties": {
100
+ "organization": {
101
+ "type": "integer"
102
+ },
103
+ "apitoken": {
104
+ "type": "integer"
105
+ },
106
+ "application": {
107
+ "type": "integer"
108
+ },
109
+ "applicationcertificate": {
110
+ "type": "integer"
111
+ },
112
+ "applicationcertificateauthority": {
113
+ "type": "integer"
114
+ },
115
+ "applicationkey": {
116
+ "type": "integer"
117
+ },
118
+ "dashboard": {
119
+ "type": "integer"
120
+ },
121
+ "datatable": {
122
+ "type": "integer"
123
+ },
124
+ "device": {
125
+ "type": "integer"
126
+ },
127
+ "devicerecipe": {
128
+ "type": "integer"
129
+ },
130
+ "experiencedomain": {
131
+ "type": "integer"
132
+ },
133
+ "experienceendpoint": {
134
+ "type": "integer"
135
+ },
136
+ "experiencegroup": {
137
+ "type": "integer"
138
+ },
139
+ "experienceslug": {
140
+ "type": "integer"
141
+ },
142
+ "experienceuser": {
143
+ "type": "integer"
144
+ },
145
+ "experienceversion": {
146
+ "type": "integer"
147
+ },
148
+ "experienceview": {
149
+ "type": "integer"
150
+ },
151
+ "file": {
152
+ "type": "integer"
153
+ },
154
+ "flow": {
155
+ "type": "integer"
156
+ },
157
+ "integration": {
158
+ "type": "integer"
159
+ },
160
+ "notebook": {
161
+ "type": "integer"
162
+ },
163
+ "resourcejob": {
164
+ "type": "integer"
165
+ },
166
+ "webhook": {
167
+ "type": "integer"
168
+ },
169
+ "dataTTL": {
170
+ "type": "integer"
171
+ },
172
+ "member": {
173
+ "type": "integer"
174
+ },
175
+ "payload": {
176
+ "type": "integer"
177
+ },
178
+ "storage": {
179
+ "type": "integer"
180
+ },
181
+ "notebookMinutesPerRun": {
182
+ "type": "integer"
183
+ },
184
+ "notebookMinutesPerMonth": {
185
+ "type": "integer"
186
+ },
187
+ "notebookInParallel": {
188
+ "type": "integer"
189
+ },
190
+ "experienceFlowSlots": {
191
+ "type": "integer"
192
+ },
193
+ "applicationFlowSlots": {
194
+ "type": "integer"
195
+ },
196
+ "systemInterval": {
197
+ "type": "integer"
198
+ }
199
+ },
200
+ "additionalProperties": false
201
+ },
202
+ "members": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "properties": {
207
+ "userId": {
208
+ "type": "string",
209
+ "pattern": "^[A-Fa-f\\d]{24}$"
210
+ },
211
+ "role": {
212
+ "type": "string",
213
+ "enum": [
214
+ "admin",
215
+ "edit",
216
+ "collaborate",
217
+ "view",
218
+ "none"
219
+ ]
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
9
225
  }
10
226
  },
11
227
  "count": {
data/schemas/me.json CHANGED
@@ -137,6 +137,9 @@
137
137
  "notebook": {
138
138
  "type": "integer"
139
139
  },
140
+ "resourcejob": {
141
+ "type": "integer"
142
+ },
140
143
  "webhook": {
141
144
  "type": "integer"
142
145
  },
@@ -459,6 +462,14 @@
459
462
  "type": "number"
460
463
  }
461
464
  }
465
+ },
466
+ "resourceJob": {
467
+ "type": "object",
468
+ "patternProperties": {
469
+ ".*": {
470
+ "type": "number"
471
+ }
472
+ }
462
473
  }
463
474
  }
464
475
  },
@@ -35,7 +35,9 @@
35
35
  "inProgress",
36
36
  "completed",
37
37
  "errored",
38
- "timeout"
38
+ "timeout",
39
+ "canceling",
40
+ "canceled"
39
41
  ]
40
42
  },
41
43
  "executionRelativeTo": {
data/schemas/org.json CHANGED
@@ -183,6 +183,9 @@
183
183
  "notebook": {
184
184
  "type": "integer"
185
185
  },
186
+ "resourcejob": {
187
+ "type": "integer"
188
+ },
186
189
  "webhook": {
187
190
  "type": "integer"
188
191
  },
@@ -397,6 +400,14 @@
397
400
  "type": "number"
398
401
  }
399
402
  }
403
+ },
404
+ "resourceJob": {
405
+ "type": "object",
406
+ "patternProperties": {
407
+ ".*": {
408
+ "type": "number"
409
+ }
410
+ }
400
411
  }
401
412
  }
402
413
  },
data/schemas/orgs.json CHANGED
@@ -190,6 +190,9 @@
190
190
  "notebook": {
191
191
  "type": "integer"
192
192
  },
193
+ "resourcejob": {
194
+ "type": "integer"
195
+ },
193
196
  "webhook": {
194
197
  "type": "integer"
195
198
  },
@@ -404,6 +407,14 @@
404
407
  "type": "number"
405
408
  }
406
409
  }
410
+ },
411
+ "resourceJob": {
412
+ "type": "object",
413
+ "patternProperties": {
414
+ ".*": {
415
+ "type": "number"
416
+ }
417
+ }
407
418
  }
408
419
  }
409
420
  },
@@ -121,6 +121,14 @@
121
121
  "type": "number"
122
122
  }
123
123
  }
124
+ },
125
+ "resourceJob": {
126
+ "type": "object",
127
+ "patternProperties": {
128
+ ".*": {
129
+ "type": "number"
130
+ }
131
+ }
124
132
  }
125
133
  }
126
134
  }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "resourceJobId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Fa-f\\d]{24}$"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 255
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "maxLength": 32767
21
+ },
22
+ "applicationId": {
23
+ "type": "string",
24
+ "pattern": "^[A-Fa-f\\d]{24}$"
25
+ },
26
+ "dataTableId": {
27
+ "oneOf": [
28
+ {
29
+ "type": "string",
30
+ "pattern": "^[A-Fa-f\\d]{24}$"
31
+ },
32
+ {
33
+ "type": "string",
34
+ "minLength": 4,
35
+ "maxLength": 255,
36
+ "pattern": ".*{{.+}}.*"
37
+ }
38
+ ]
39
+ },
40
+ "queryJson": {
41
+ "type": "string",
42
+ "maxLength": 8192
43
+ },
44
+ "resourceType": {
45
+ "type": "string",
46
+ "enum": [
47
+ "dataTableRow",
48
+ "device"
49
+ ]
50
+ },
51
+ "maxIterationConcurrency": {
52
+ "type": "number",
53
+ "enum": [
54
+ 1,
55
+ 10
56
+ ]
57
+ },
58
+ "iterationDelay": {
59
+ "type": "number",
60
+ "min": 0,
61
+ "max": 60000
62
+ },
63
+ "iterationTimeout": {
64
+ "type": "number",
65
+ "min": 60000,
66
+ "max": 900000
67
+ },
68
+ "creationDate": {
69
+ "type": "string",
70
+ "format": "date-time"
71
+ },
72
+ "lastUpdated": {
73
+ "type": "string",
74
+ "format": "date-time"
75
+ },
76
+ "lastExecutionRequested": {
77
+ "type": "string",
78
+ "format": "date-time"
79
+ },
80
+ "defaultContext": {
81
+ "type": "string",
82
+ "maxLength": 32767
83
+ }
84
+ },
85
+ "additionalProperties": false
86
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "array",
4
+ "items": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "pattern": "^[A-Fa-f\\d]{24}$"
10
+ },
11
+ "applicationId": {
12
+ "type": "string",
13
+ "pattern": "^[A-Fa-f\\d]{24}$"
14
+ },
15
+ "resourceJobExecutionId": {
16
+ "type": "string",
17
+ "pattern": "^[A-Fa-f\\d]{24}$"
18
+ },
19
+ "resourceJobId": {
20
+ "type": "string",
21
+ "pattern": "^[A-Fa-f\\d]{24}$"
22
+ },
23
+ "status": {
24
+ "type": "string",
25
+ "enum": [
26
+ "inProgress",
27
+ "completed",
28
+ "erroring",
29
+ "errored",
30
+ "canceling",
31
+ "canceled"
32
+ ]
33
+ },
34
+ "queryJson": {
35
+ "type": "string",
36
+ "maxLength": 8192
37
+ },
38
+ "resourceType": {
39
+ "type": "string",
40
+ "enum": [
41
+ "dataTableRow",
42
+ "device"
43
+ ]
44
+ },
45
+ "sourceType": {
46
+ "type": "string",
47
+ "enum": [
48
+ "flow",
49
+ "user",
50
+ "device",
51
+ "apiToken",
52
+ "notebook"
53
+ ]
54
+ },
55
+ "sourceId": {
56
+ "type": "string",
57
+ "pattern": "^[A-Fa-f\\d]{24}$"
58
+ },
59
+ "cancelSourceType": {
60
+ "type": "string",
61
+ "enum": [
62
+ "flow",
63
+ "user",
64
+ "device",
65
+ "apiToken",
66
+ "notebook"
67
+ ]
68
+ },
69
+ "cancelSourceId": {
70
+ "type": "string",
71
+ "pattern": "^[A-Fa-f\\d]{24}$"
72
+ },
73
+ "runStartedAt": {
74
+ "type": "string",
75
+ "format": "date-time"
76
+ },
77
+ "runCompletedAt": {
78
+ "type": "string",
79
+ "format": "date-time"
80
+ },
81
+ "executionReportUrl": {
82
+ "type": "string"
83
+ },
84
+ "templateContext": {
85
+ "type": "string",
86
+ "maxLength": 32767
87
+ },
88
+ "iterationDelay": {
89
+ "type": "number",
90
+ "min": 0,
91
+ "max": 60000
92
+ },
93
+ "iterationTimeout": {
94
+ "type": "number",
95
+ "min": 60000,
96
+ "max": 900000
97
+ },
98
+ "maxIterationConcurrency": {
99
+ "type": "number",
100
+ "enum": [
101
+ 1,
102
+ 10
103
+ ]
104
+ },
105
+ "executionSummary": {
106
+ "type": "object",
107
+ "properties": {
108
+ "succeeded": {
109
+ "type": "number"
110
+ },
111
+ "failed": {
112
+ "type": "number"
113
+ },
114
+ "timedOut": {
115
+ "type": "number"
116
+ },
117
+ "inProgress": {
118
+ "type": "number"
119
+ },
120
+ "remaining": {
121
+ "type": "number"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "templateContext": {
6
+ "type": "string",
7
+ "maxLength": 32767
8
+ }
9
+ },
10
+ "additionalProperties": false
11
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "dataTableId": {
15
+ "oneOf": [
16
+ {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ {
21
+ "type": "string",
22
+ "minLength": 4,
23
+ "maxLength": 255,
24
+ "pattern": ".*{{.+}}.*"
25
+ }
26
+ ]
27
+ },
28
+ "queryJson": {
29
+ "type": "string",
30
+ "maxLength": 8192
31
+ },
32
+ "maxIterationConcurrency": {
33
+ "type": "number",
34
+ "enum": [
35
+ 1,
36
+ 10
37
+ ]
38
+ },
39
+ "iterationDelay": {
40
+ "type": "number",
41
+ "min": 0,
42
+ "max": 60000
43
+ },
44
+ "iterationTimeout": {
45
+ "type": "number",
46
+ "min": 60000,
47
+ "max": 900000
48
+ },
49
+ "defaultContext": {
50
+ "type": "string",
51
+ "maxLength": 32767
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "dataTableId": {
15
+ "oneOf": [
16
+ {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ {
21
+ "type": "string",
22
+ "minLength": 4,
23
+ "maxLength": 255,
24
+ "pattern": ".*{{.+}}.*"
25
+ }
26
+ ]
27
+ },
28
+ "queryJson": {
29
+ "type": "string",
30
+ "maxLength": 8192
31
+ },
32
+ "resourceType": {
33
+ "type": "string",
34
+ "enum": [
35
+ "dataTableRow",
36
+ "device"
37
+ ]
38
+ },
39
+ "maxIterationConcurrency": {
40
+ "type": "number",
41
+ "enum": [
42
+ 1,
43
+ 10
44
+ ]
45
+ },
46
+ "iterationDelay": {
47
+ "type": "number",
48
+ "min": 0,
49
+ "max": 60000
50
+ },
51
+ "iterationTimeout": {
52
+ "type": "number",
53
+ "min": 60000,
54
+ "max": 900000
55
+ },
56
+ "defaultContext": {
57
+ "type": "string",
58
+ "maxLength": 32767
59
+ }
60
+ },
61
+ "additionalProperties": false,
62
+ "required": [
63
+ "name",
64
+ "resourceType"
65
+ ]
66
+ }