losant_rest 1.8.5 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2209 -127
  3. data/docs/application.md +4 -2
  4. data/docs/applications.md +4 -2
  5. data/docs/data.md +41 -0
  6. data/docs/me.md +4 -2
  7. data/docs/notebook.md +305 -0
  8. data/docs/notebooks.md +93 -0
  9. data/docs/org.md +8 -2
  10. data/docs/orgs.md +4 -2
  11. data/lib/losant_rest/application.rb +6 -2
  12. data/lib/losant_rest/applications.rb +6 -2
  13. data/lib/losant_rest/client.rb +10 -2
  14. data/lib/losant_rest/data.rb +47 -0
  15. data/lib/losant_rest/me.rb +6 -2
  16. data/lib/losant_rest/notebook.rb +322 -0
  17. data/lib/losant_rest/notebooks.rb +136 -0
  18. data/lib/losant_rest/org.rb +14 -2
  19. data/lib/losant_rest/orgs.rb +6 -2
  20. data/lib/losant_rest/version.rb +1 -1
  21. data/lib/losant_rest.rb +2 -0
  22. data/schemas/application.json +15 -4
  23. data/schemas/applicationApiTokenPost.json +12 -0
  24. data/schemas/applications.json +15 -4
  25. data/schemas/dataExport.json +65 -0
  26. data/schemas/deviceCredentials.json +1 -0
  27. data/schemas/edgeDeployment.json +2 -1
  28. data/schemas/edgeDeployments.json +2 -1
  29. data/schemas/event.json +4 -2
  30. data/schemas/events.json +4 -2
  31. data/schemas/file.json +2 -1
  32. data/schemas/fileUploadPostResponse.json +20 -26
  33. data/schemas/files.json +2 -1
  34. data/schemas/flow.json +1 -0
  35. data/schemas/flowPatch.json +1 -0
  36. data/schemas/flowPost.json +1 -0
  37. data/schemas/flowVersion.json +2 -0
  38. data/schemas/flowVersionPost.json +1 -0
  39. data/schemas/flowVersions.json +2 -0
  40. data/schemas/flows.json +1 -0
  41. data/schemas/flowsImportPost.json +2 -0
  42. data/schemas/flowsImportResult.json +3 -0
  43. data/schemas/githubLogin.json +12 -0
  44. data/schemas/me.json +28 -8
  45. data/schemas/notebook.json +322 -0
  46. data/schemas/notebookDataExportOptions.json +34 -0
  47. data/schemas/notebookExecutionLogs.json +125 -0
  48. data/schemas/notebookExecutionOptions.json +29 -0
  49. data/schemas/notebookPatch.json +295 -0
  50. data/schemas/notebookPost.json +298 -0
  51. data/schemas/notebooks.json +364 -0
  52. data/schemas/org.json +27 -10
  53. data/schemas/orgs.json +27 -10
  54. data/schemas/userCredentials.json +12 -0
  55. data/schemas/userPost.json +12 -0
  56. metadata +14 -2
@@ -0,0 +1,364 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Notebook",
9
+ "description": "Schema for a single Notebook",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "notebookId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "applicationId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Fa-f\\d]{24}$"
23
+ },
24
+ "creationDate": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "lastUpdated": {
29
+ "type": "string",
30
+ "format": "date-time"
31
+ },
32
+ "name": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 1024
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "maxLength": 32767
40
+ },
41
+ "jupyterFileName": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "maxLength": 1024
45
+ },
46
+ "jupyterFileUrl": {
47
+ "type": "string"
48
+ },
49
+ "inputs": {
50
+ "type": "array",
51
+ "items": {
52
+ "maxItems": 100,
53
+ "oneOf": [
54
+ {
55
+ "type": "object",
56
+ "properties": {
57
+ "inputType": {
58
+ "type": "string",
59
+ "enum": [
60
+ "deviceData"
61
+ ]
62
+ },
63
+ "fileName": {
64
+ "type": "string",
65
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
66
+ },
67
+ "deviceTags": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "properties": {
72
+ "key": {
73
+ "type": "string",
74
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
75
+ },
76
+ "value": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "maxLength": 255
80
+ }
81
+ },
82
+ "additionalProperties": false
83
+ },
84
+ "maxItems": 100
85
+ },
86
+ "deviceIds": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string",
90
+ "pattern": "^[A-Fa-f\\d]{24}$"
91
+ },
92
+ "maxItems": 1000
93
+ },
94
+ "attributes": {
95
+ "type": "array",
96
+ "maxItems": 100,
97
+ "items": {
98
+ "type": "string",
99
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
100
+ }
101
+ },
102
+ "start": {
103
+ "type": "number"
104
+ },
105
+ "end": {
106
+ "type": "number"
107
+ }
108
+ },
109
+ "required": [
110
+ "inputType",
111
+ "fileName",
112
+ "start",
113
+ "end"
114
+ ],
115
+ "additionalProperties": false
116
+ },
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "inputType": {
121
+ "type": "string",
122
+ "enum": [
123
+ "deviceMetadata"
124
+ ]
125
+ },
126
+ "fileName": {
127
+ "type": "string",
128
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
129
+ },
130
+ "deviceTags": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "object",
134
+ "properties": {
135
+ "key": {
136
+ "type": "string",
137
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
138
+ },
139
+ "value": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "maxLength": 255
143
+ }
144
+ },
145
+ "additionalProperties": false
146
+ },
147
+ "maxItems": 100
148
+ },
149
+ "deviceIds": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "string",
153
+ "pattern": "^[A-Fa-f\\d]{24}$"
154
+ },
155
+ "maxItems": 1000
156
+ }
157
+ },
158
+ "required": [
159
+ "inputType",
160
+ "fileName"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ {
165
+ "type": "object",
166
+ "properties": {
167
+ "inputType": {
168
+ "type": "string",
169
+ "enum": [
170
+ "dataTable"
171
+ ]
172
+ },
173
+ "fileName": {
174
+ "type": "string",
175
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
176
+ },
177
+ "dataTableId": {
178
+ "type": "string",
179
+ "pattern": "^[A-Fa-f\\d]{24}$"
180
+ },
181
+ "queryJson": {
182
+ "type": "string",
183
+ "maxLength": 32767
184
+ }
185
+ },
186
+ "required": [
187
+ "inputType",
188
+ "fileName",
189
+ "dataTableId"
190
+ ],
191
+ "additionalProperties": false
192
+ },
193
+ {
194
+ "type": "object",
195
+ "properties": {
196
+ "inputType": {
197
+ "type": "string",
198
+ "enum": [
199
+ "externalUrl"
200
+ ]
201
+ },
202
+ "fileName": {
203
+ "type": "string",
204
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
205
+ },
206
+ "sourceUrl": {
207
+ "type": "string",
208
+ "minLength": 1,
209
+ "maxLength": 1024
210
+ }
211
+ },
212
+ "required": [
213
+ "inputType",
214
+ "fileName",
215
+ "sourceUrl"
216
+ ],
217
+ "additionalProperties": false
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ "outputs": {
223
+ "type": "array",
224
+ "items": {
225
+ "maxItems": 100,
226
+ "oneOf": [
227
+ {
228
+ "type": "object",
229
+ "properties": {
230
+ "outputType": {
231
+ "type": "string",
232
+ "enum": [
233
+ "dataTable"
234
+ ]
235
+ },
236
+ "fileName": {
237
+ "type": "string",
238
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
239
+ },
240
+ "dataTableId": {
241
+ "type": "string",
242
+ "pattern": "^[A-Fa-f\\d]{24}$"
243
+ },
244
+ "createMissingColumns": {
245
+ "type": "boolean"
246
+ },
247
+ "truncateExistingTable": {
248
+ "type": "boolean"
249
+ }
250
+ },
251
+ "required": [
252
+ "fileName",
253
+ "outputType",
254
+ "dataTableId"
255
+ ],
256
+ "additionalProperties": false
257
+ },
258
+ {
259
+ "type": "object",
260
+ "properties": {
261
+ "outputType": {
262
+ "type": "string",
263
+ "enum": [
264
+ "file"
265
+ ]
266
+ },
267
+ "fileName": {
268
+ "type": "string",
269
+ "pattern": "^[0-9a-zA-Z_.-]{1,255}$"
270
+ },
271
+ "destinationDirectoryTemplate": {
272
+ "type": "string",
273
+ "minLength": 1,
274
+ "maxLength": 1024
275
+ },
276
+ "destinationFileNameTemplate": {
277
+ "type": "string",
278
+ "minLength": 1,
279
+ "maxLength": 1024
280
+ }
281
+ },
282
+ "required": [
283
+ "fileName",
284
+ "outputType",
285
+ "destinationFileNameTemplate"
286
+ ],
287
+ "additionalProperties": false
288
+ },
289
+ {
290
+ "type": "object",
291
+ "properties": {
292
+ "outputType": {
293
+ "type": "string",
294
+ "enum": [
295
+ "executionResult"
296
+ ]
297
+ },
298
+ "fileName": {
299
+ "type": "string",
300
+ "enum": [
301
+ "result.html",
302
+ "result.pdf",
303
+ "result.ipynb",
304
+ "result.error.log",
305
+ "result.log"
306
+ ]
307
+ },
308
+ "destinationDirectoryTemplate": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 1024
312
+ },
313
+ "destinationFileNameTemplate": {
314
+ "type": "string",
315
+ "minLength": 1,
316
+ "maxLength": 1024
317
+ }
318
+ },
319
+ "required": [
320
+ "fileName",
321
+ "outputType"
322
+ ],
323
+ "additionalProperties": false
324
+ }
325
+ ]
326
+ }
327
+ }
328
+ }
329
+ }
330
+ },
331
+ "count": {
332
+ "type": "integer"
333
+ },
334
+ "totalCount": {
335
+ "type": "integer"
336
+ },
337
+ "perPage": {
338
+ "type": "integer"
339
+ },
340
+ "page": {
341
+ "type": "integer"
342
+ },
343
+ "filter": {
344
+ "type": "string"
345
+ },
346
+ "filterField": {
347
+ "type": "string"
348
+ },
349
+ "sortField": {
350
+ "type": "string"
351
+ },
352
+ "sortDirection": {
353
+ "type": "string",
354
+ "enum": [
355
+ "asc",
356
+ "desc"
357
+ ]
358
+ },
359
+ "applicationId": {
360
+ "type": "string",
361
+ "pattern": "^[A-Fa-f\\d]{24}$"
362
+ }
363
+ }
364
+ }
data/schemas/org.json CHANGED
@@ -172,10 +172,10 @@
172
172
  "flow": {
173
173
  "type": "number"
174
174
  },
175
- "solution": {
175
+ "integration": {
176
176
  "type": "number"
177
177
  },
178
- "integration": {
178
+ "notebook": {
179
179
  "type": "number"
180
180
  },
181
181
  "webhook": {
@@ -189,6 +189,15 @@
189
189
  },
190
190
  "payload": {
191
191
  "type": "number"
192
+ },
193
+ "notebookMinutesPerRun": {
194
+ "type": "number"
195
+ },
196
+ "notebookMinutesPerMonth": {
197
+ "type": "number"
198
+ },
199
+ "notebookInParallel": {
200
+ "type": "number"
192
201
  }
193
202
  },
194
203
  "summary": {
@@ -200,9 +209,6 @@
200
209
  "appCount": {
201
210
  "type": "number"
202
211
  },
203
- "keyCount": {
204
- "type": "number"
205
- },
206
212
  "dashCount": {
207
213
  "type": "number"
208
214
  },
@@ -242,10 +248,13 @@
242
248
  "flowCount": {
243
249
  "type": "number"
244
250
  },
245
- "memberCount": {
251
+ "integrationCount": {
246
252
  "type": "number"
247
253
  },
248
- "pendingInviteCount": {
254
+ "keyCount": {
255
+ "type": "number"
256
+ },
257
+ "memberCount": {
249
258
  "type": "number"
250
259
  },
251
260
  "payloadCount": {
@@ -359,11 +368,19 @@
359
368
  }
360
369
  }
361
370
  },
362
- "solutionCount": {
371
+ "pendingInviteCount": {
363
372
  "type": "number"
364
373
  },
365
- "integrationCount": {
366
- "type": "number"
374
+ "storageStats": {
375
+ "type": "object",
376
+ "properties": {
377
+ "count": {
378
+ "type": "number"
379
+ },
380
+ "size": {
381
+ "type": "number"
382
+ }
383
+ }
367
384
  },
368
385
  "webhookCount": {
369
386
  "type": "number"
data/schemas/orgs.json CHANGED
@@ -179,10 +179,10 @@
179
179
  "flow": {
180
180
  "type": "number"
181
181
  },
182
- "solution": {
182
+ "integration": {
183
183
  "type": "number"
184
184
  },
185
- "integration": {
185
+ "notebook": {
186
186
  "type": "number"
187
187
  },
188
188
  "webhook": {
@@ -196,6 +196,15 @@
196
196
  },
197
197
  "payload": {
198
198
  "type": "number"
199
+ },
200
+ "notebookMinutesPerRun": {
201
+ "type": "number"
202
+ },
203
+ "notebookMinutesPerMonth": {
204
+ "type": "number"
205
+ },
206
+ "notebookInParallel": {
207
+ "type": "number"
199
208
  }
200
209
  },
201
210
  "summary": {
@@ -207,9 +216,6 @@
207
216
  "appCount": {
208
217
  "type": "number"
209
218
  },
210
- "keyCount": {
211
- "type": "number"
212
- },
213
219
  "dashCount": {
214
220
  "type": "number"
215
221
  },
@@ -249,10 +255,13 @@
249
255
  "flowCount": {
250
256
  "type": "number"
251
257
  },
252
- "memberCount": {
258
+ "integrationCount": {
253
259
  "type": "number"
254
260
  },
255
- "pendingInviteCount": {
261
+ "keyCount": {
262
+ "type": "number"
263
+ },
264
+ "memberCount": {
256
265
  "type": "number"
257
266
  },
258
267
  "payloadCount": {
@@ -366,11 +375,19 @@
366
375
  }
367
376
  }
368
377
  },
369
- "solutionCount": {
378
+ "pendingInviteCount": {
370
379
  "type": "number"
371
380
  },
372
- "integrationCount": {
373
- "type": "number"
381
+ "storageStats": {
382
+ "type": "object",
383
+ "properties": {
384
+ "count": {
385
+ "type": "number"
386
+ },
387
+ "size": {
388
+ "type": "number"
389
+ }
390
+ }
374
391
  },
375
392
  "webhookCount": {
376
393
  "type": "number"
@@ -70,6 +70,8 @@
70
70
  "flows.*",
71
71
  "flowVersion.*",
72
72
  "flowVersions.*",
73
+ "notebook.*",
74
+ "notebooks.*",
73
75
  "webhook.*",
74
76
  "webhooks.*",
75
77
  "application.archiveData",
@@ -92,6 +94,7 @@
92
94
  "applicationKey.patch",
93
95
  "applicationKeys.get",
94
96
  "applicationKeys.post",
97
+ "data.export",
95
98
  "data.lastValueQuery",
96
99
  "data.timeSeriesQuery",
97
100
  "dataTable.addColumn",
@@ -220,6 +223,15 @@
220
223
  "integration.patch",
221
224
  "integrations.get",
222
225
  "integrations.post",
226
+ "notebook.delete",
227
+ "notebook.execute",
228
+ "notebook.get",
229
+ "notebook.logs",
230
+ "notebook.patch",
231
+ "notebook.requestInputDataExport",
232
+ "notebook.upload",
233
+ "notebooks.get",
234
+ "notebooks.post",
223
235
  "webhook.delete",
224
236
  "webhook.get",
225
237
  "webhook.patch",
@@ -125,6 +125,8 @@
125
125
  "flows.*",
126
126
  "flowVersion.*",
127
127
  "flowVersions.*",
128
+ "notebook.*",
129
+ "notebooks.*",
128
130
  "webhook.*",
129
131
  "webhooks.*",
130
132
  "application.archiveData",
@@ -147,6 +149,7 @@
147
149
  "applicationKey.patch",
148
150
  "applicationKeys.get",
149
151
  "applicationKeys.post",
152
+ "data.export",
150
153
  "data.lastValueQuery",
151
154
  "data.timeSeriesQuery",
152
155
  "dataTable.addColumn",
@@ -275,6 +278,15 @@
275
278
  "integration.patch",
276
279
  "integrations.get",
277
280
  "integrations.post",
281
+ "notebook.delete",
282
+ "notebook.execute",
283
+ "notebook.get",
284
+ "notebook.logs",
285
+ "notebook.patch",
286
+ "notebook.requestInputDataExport",
287
+ "notebook.upload",
288
+ "notebooks.get",
289
+ "notebooks.post",
278
290
  "webhook.delete",
279
291
  "webhook.get",
280
292
  "webhook.patch",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-26 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -129,6 +129,8 @@ files:
129
129
  - docs/integration.md
130
130
  - docs/integrations.md
131
131
  - docs/me.md
132
+ - docs/notebook.md
133
+ - docs/notebooks.md
132
134
  - docs/org.md
133
135
  - docs/orgInvites.md
134
136
  - docs/orgs.md
@@ -190,6 +192,8 @@ files:
190
192
  - lib/losant_rest/integration.rb
191
193
  - lib/losant_rest/integrations.rb
192
194
  - lib/losant_rest/me.rb
195
+ - lib/losant_rest/notebook.rb
196
+ - lib/losant_rest/notebooks.rb
193
197
  - lib/losant_rest/org.rb
194
198
  - lib/losant_rest/org_invites.rb
195
199
  - lib/losant_rest/orgs.rb
@@ -230,6 +234,7 @@ files:
230
234
  - schemas/dashboardPost.json
231
235
  - schemas/dashboardSendReport.json
232
236
  - schemas/dashboards.json
237
+ - schemas/dataExport.json
233
238
  - schemas/dataTable.json
234
239
  - schemas/dataTableColumn.json
235
240
  - schemas/dataTablePatch.json
@@ -339,6 +344,13 @@ files:
339
344
  - schemas/mePatch.json
340
345
  - schemas/mqttPublishBody.json
341
346
  - schemas/multiDeviceCommand.json
347
+ - schemas/notebook.json
348
+ - schemas/notebookDataExportOptions.json
349
+ - schemas/notebookExecutionLogs.json
350
+ - schemas/notebookExecutionOptions.json
351
+ - schemas/notebookPatch.json
352
+ - schemas/notebookPost.json
353
+ - schemas/notebooks.json
342
354
  - schemas/org.json
343
355
  - schemas/orgInviteAction.json
344
356
  - schemas/orgInviteInfo.json