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
@@ -92,15 +92,12 @@
92
92
  "apiTokenCount": {
93
93
  "type": "number"
94
94
  },
95
- "keyCount": {
95
+ "dataTableCount": {
96
96
  "type": "number"
97
97
  },
98
98
  "deviceCount": {
99
99
  "type": "number"
100
100
  },
101
- "dataTableCount": {
102
- "type": "number"
103
- },
104
101
  "deviceRecipeCount": {
105
102
  "type": "number"
106
103
  },
@@ -137,6 +134,20 @@
137
134
  "integrationCount": {
138
135
  "type": "number"
139
136
  },
137
+ "keyCount": {
138
+ "type": "number"
139
+ },
140
+ "storageStats": {
141
+ "type": "object",
142
+ "properties": {
143
+ "count": {
144
+ "type": "number"
145
+ },
146
+ "size": {
147
+ "type": "number"
148
+ }
149
+ }
150
+ },
140
151
  "webhookCount": {
141
152
  "type": "number"
142
153
  }
@@ -65,6 +65,8 @@
65
65
  "flows.*",
66
66
  "flowVersion.*",
67
67
  "flowVersions.*",
68
+ "notebook.*",
69
+ "notebooks.*",
68
70
  "webhook.*",
69
71
  "webhooks.*",
70
72
  "application.archiveData",
@@ -87,6 +89,7 @@
87
89
  "applicationKey.patch",
88
90
  "applicationKeys.get",
89
91
  "applicationKeys.post",
92
+ "data.export",
90
93
  "data.lastValueQuery",
91
94
  "data.timeSeriesQuery",
92
95
  "dataTable.addColumn",
@@ -215,6 +218,15 @@
215
218
  "integration.patch",
216
219
  "integrations.get",
217
220
  "integrations.post",
221
+ "notebook.delete",
222
+ "notebook.execute",
223
+ "notebook.get",
224
+ "notebook.logs",
225
+ "notebook.patch",
226
+ "notebook.requestInputDataExport",
227
+ "notebook.upload",
228
+ "notebooks.get",
229
+ "notebooks.post",
218
230
  "webhook.delete",
219
231
  "webhook.get",
220
232
  "webhook.patch",
@@ -99,15 +99,12 @@
99
99
  "apiTokenCount": {
100
100
  "type": "number"
101
101
  },
102
- "keyCount": {
102
+ "dataTableCount": {
103
103
  "type": "number"
104
104
  },
105
105
  "deviceCount": {
106
106
  "type": "number"
107
107
  },
108
- "dataTableCount": {
109
- "type": "number"
110
- },
111
108
  "deviceRecipeCount": {
112
109
  "type": "number"
113
110
  },
@@ -144,6 +141,20 @@
144
141
  "integrationCount": {
145
142
  "type": "number"
146
143
  },
144
+ "keyCount": {
145
+ "type": "number"
146
+ },
147
+ "storageStats": {
148
+ "type": "object",
149
+ "properties": {
150
+ "count": {
151
+ "type": "number"
152
+ },
153
+ "size": {
154
+ "type": "number"
155
+ }
156
+ }
157
+ },
147
158
  "webhookCount": {
148
159
  "type": "number"
149
160
  }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "email": {
6
+ "type": "string",
7
+ "format": "email",
8
+ "maxLength": 1024
9
+ },
10
+ "deviceIds": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "maxItems": 1000
17
+ },
18
+ "deviceTags": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "key": {
24
+ "type": "string",
25
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
26
+ },
27
+ "value": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 255
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ },
35
+ "maxItems": 100
36
+ },
37
+ "attributes": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string",
41
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
42
+ }
43
+ },
44
+ "start": {
45
+ "type": "number"
46
+ },
47
+ "end": {
48
+ "type": "number"
49
+ },
50
+ "options": {
51
+ "type": "object",
52
+ "properties": {
53
+ "includeDate": {
54
+ "type": "boolean",
55
+ "default": true
56
+ },
57
+ "includeID": {
58
+ "type": "boolean",
59
+ "default": true
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ }
@@ -24,6 +24,7 @@
24
24
  "enum": [
25
25
  "all.Device",
26
26
  "all.Device.read",
27
+ "data.export",
27
28
  "data.timeSeriesQuery",
28
29
  "data.lastValueQuery",
29
30
  "device.commandStream",
@@ -67,7 +67,8 @@
67
67
  "flow",
68
68
  "user",
69
69
  "device",
70
- "apiToken"
70
+ "apiToken",
71
+ "notebook"
71
72
  ]
72
73
  },
73
74
  "sourceId": {
@@ -74,7 +74,8 @@
74
74
  "flow",
75
75
  "user",
76
76
  "device",
77
- "apiToken"
77
+ "apiToken",
78
+ "notebook"
78
79
  ]
79
80
  },
80
81
  "sourceId": {
data/schemas/event.json CHANGED
@@ -28,7 +28,8 @@
28
28
  "flow",
29
29
  "user",
30
30
  "device",
31
- "apiToken"
31
+ "apiToken",
32
+ "notebook"
32
33
  ]
33
34
  },
34
35
  "sourceId": {
@@ -73,7 +74,8 @@
73
74
  "flow",
74
75
  "user",
75
76
  "device",
76
- "apiToken"
77
+ "apiToken",
78
+ "notebook"
77
79
  ]
78
80
  },
79
81
  "sourceId": {
data/schemas/events.json CHANGED
@@ -35,7 +35,8 @@
35
35
  "flow",
36
36
  "user",
37
37
  "device",
38
- "apiToken"
38
+ "apiToken",
39
+ "notebook"
39
40
  ]
40
41
  },
41
42
  "sourceId": {
@@ -80,7 +81,8 @@
80
81
  "flow",
81
82
  "user",
82
83
  "device",
83
- "apiToken"
84
+ "apiToken",
85
+ "notebook"
84
86
  ]
85
87
  },
86
88
  "sourceId": {
data/schemas/file.json CHANGED
@@ -28,7 +28,8 @@
28
28
  "flow",
29
29
  "user",
30
30
  "device",
31
- "apiToken"
31
+ "apiToken",
32
+ "notebook"
32
33
  ]
33
34
  },
34
35
  "status": {
@@ -28,7 +28,8 @@
28
28
  "flow",
29
29
  "user",
30
30
  "device",
31
- "apiToken"
31
+ "apiToken",
32
+ "notebook"
32
33
  ]
33
34
  },
34
35
  "status": {
@@ -75,32 +76,25 @@
75
76
  }
76
77
  },
77
78
  "upload": {
78
- "url": {
79
- "type": "string"
80
- },
81
- "fields": {
82
- "type": "object",
83
- "properties": {
84
- "key": {
85
- "type": "string"
86
- },
87
- "bucket": {
88
- "type": "string"
89
- },
90
- "X-Amz-Algorithm": {
91
- "type": "string"
92
- },
93
- "X-Amz-Credential": {
94
- "type": "string"
95
- },
96
- "X-Amz-Date": {
97
- "type": "string"
98
- },
99
- "Policy": {
100
- "type": "string"
79
+ "type": "object",
80
+ "properties": {
81
+ "url": {
82
+ "type": "string"
83
+ },
84
+ "fields": {
85
+ "type": "object",
86
+ "patternProperties": {
87
+ "^.*$": {
88
+ "type": "string"
89
+ }
101
90
  },
102
- "X-Amz-Signature": {
103
- "type": "string"
91
+ "properties": {
92
+ "key": {
93
+ "type": "string"
94
+ },
95
+ "bucket": {
96
+ "type": "string"
97
+ }
104
98
  }
105
99
  }
106
100
  }
data/schemas/files.json CHANGED
@@ -35,7 +35,8 @@
35
35
  "flow",
36
36
  "user",
37
37
  "device",
38
- "apiToken"
38
+ "apiToken",
39
+ "notebook"
39
40
  ]
40
41
  },
41
42
  "status": {
data/schemas/flow.json CHANGED
@@ -84,6 +84,7 @@
84
84
  "fileWatch",
85
85
  "integration",
86
86
  "mqttTopic",
87
+ "notebook",
87
88
  "redis",
88
89
  "request",
89
90
  "serial",
@@ -65,6 +65,7 @@
65
65
  "fileWatch",
66
66
  "integration",
67
67
  "mqttTopic",
68
+ "notebook",
68
69
  "redis",
69
70
  "request",
70
71
  "serial",
@@ -54,6 +54,7 @@
54
54
  "fileWatch",
55
55
  "integration",
56
56
  "mqttTopic",
57
+ "notebook",
57
58
  "redis",
58
59
  "request",
59
60
  "serial",
@@ -69,6 +69,7 @@
69
69
  "fileWatch",
70
70
  "integration",
71
71
  "mqttTopic",
72
+ "notebook",
72
73
  "redis",
73
74
  "request",
74
75
  "serial",
@@ -599,6 +600,7 @@
599
600
  "fileWatch",
600
601
  "integration",
601
602
  "mqttTopic",
603
+ "notebook",
602
604
  "redis",
603
605
  "request",
604
606
  "serial",
@@ -42,6 +42,7 @@
42
42
  "fileWatch",
43
43
  "integration",
44
44
  "mqttTopic",
45
+ "notebook",
45
46
  "redis",
46
47
  "request",
47
48
  "serial",
@@ -76,6 +76,7 @@
76
76
  "fileWatch",
77
77
  "integration",
78
78
  "mqttTopic",
79
+ "notebook",
79
80
  "redis",
80
81
  "request",
81
82
  "serial",
@@ -606,6 +607,7 @@
606
607
  "fileWatch",
607
608
  "integration",
608
609
  "mqttTopic",
610
+ "notebook",
609
611
  "redis",
610
612
  "request",
611
613
  "serial",
data/schemas/flows.json CHANGED
@@ -91,6 +91,7 @@
91
91
  "fileWatch",
92
92
  "integration",
93
93
  "mqttTopic",
94
+ "notebook",
94
95
  "redis",
95
96
  "request",
96
97
  "serial",
@@ -61,6 +61,7 @@
61
61
  "fileWatch",
62
62
  "integration",
63
63
  "mqttTopic",
64
+ "notebook",
64
65
  "redis",
65
66
  "request",
66
67
  "serial",
@@ -572,6 +573,7 @@
572
573
  "fileWatch",
573
574
  "integration",
574
575
  "mqttTopic",
576
+ "notebook",
575
577
  "redis",
576
578
  "request",
577
579
  "serial",
@@ -92,6 +92,7 @@
92
92
  "fileWatch",
93
93
  "integration",
94
94
  "mqttTopic",
95
+ "notebook",
95
96
  "redis",
96
97
  "request",
97
98
  "serial",
@@ -622,6 +623,7 @@
622
623
  "fileWatch",
623
624
  "integration",
624
625
  "mqttTopic",
626
+ "notebook",
625
627
  "redis",
626
628
  "request",
627
629
  "serial",
@@ -1152,6 +1154,7 @@
1152
1154
  "fileWatch",
1153
1155
  "integration",
1154
1156
  "mqttTopic",
1157
+ "notebook",
1155
1158
  "redis",
1156
1159
  "request",
1157
1160
  "serial",
@@ -60,6 +60,8 @@
60
60
  "flows.*",
61
61
  "flowVersion.*",
62
62
  "flowVersions.*",
63
+ "notebook.*",
64
+ "notebooks.*",
63
65
  "webhook.*",
64
66
  "webhooks.*",
65
67
  "application.archiveData",
@@ -82,6 +84,7 @@
82
84
  "applicationKey.patch",
83
85
  "applicationKeys.get",
84
86
  "applicationKeys.post",
87
+ "data.export",
85
88
  "data.lastValueQuery",
86
89
  "data.timeSeriesQuery",
87
90
  "dataTable.addColumn",
@@ -210,6 +213,15 @@
210
213
  "integration.patch",
211
214
  "integrations.get",
212
215
  "integrations.post",
216
+ "notebook.delete",
217
+ "notebook.execute",
218
+ "notebook.get",
219
+ "notebook.logs",
220
+ "notebook.patch",
221
+ "notebook.requestInputDataExport",
222
+ "notebook.upload",
223
+ "notebooks.get",
224
+ "notebooks.post",
213
225
  "webhook.delete",
214
226
  "webhook.get",
215
227
  "webhook.patch",
data/schemas/me.json CHANGED
@@ -132,6 +132,9 @@
132
132
  "integration": {
133
133
  "type": "number"
134
134
  },
135
+ "notebook": {
136
+ "type": "number"
137
+ },
135
138
  "webhook": {
136
139
  "type": "number"
137
140
  },
@@ -140,6 +143,15 @@
140
143
  },
141
144
  "payload": {
142
145
  "type": "number"
146
+ },
147
+ "notebookMinutesPerRun": {
148
+ "type": "number"
149
+ },
150
+ "notebookMinutesPerMonth": {
151
+ "type": "number"
152
+ },
153
+ "notebookInParallel": {
154
+ "type": "number"
143
155
  }
144
156
  },
145
157
  "recentDashboards": {
@@ -265,9 +277,6 @@
265
277
  "appCount": {
266
278
  "type": "number"
267
279
  },
268
- "keyCount": {
269
- "type": "number"
270
- },
271
280
  "dashCount": {
272
281
  "type": "number"
273
282
  },
@@ -280,9 +289,6 @@
280
289
  "deviceRecipeCount": {
281
290
  "type": "number"
282
291
  },
283
- "experienceDomainCount": {
284
- "type": "number"
285
- },
286
292
  "experienceEndpointCount": {
287
293
  "type": "number"
288
294
  },
@@ -307,6 +313,12 @@
307
313
  "flowCount": {
308
314
  "type": "number"
309
315
  },
316
+ "integrationCount": {
317
+ "type": "number"
318
+ },
319
+ "keyCount": {
320
+ "type": "number"
321
+ },
310
322
  "orgCount": {
311
323
  "type": "number"
312
324
  },
@@ -421,8 +433,16 @@
421
433
  }
422
434
  }
423
435
  },
424
- "integrationCount": {
425
- "type": "number"
436
+ "storageStats": {
437
+ "type": "object",
438
+ "properties": {
439
+ "count": {
440
+ "type": "number"
441
+ },
442
+ "size": {
443
+ "type": "number"
444
+ }
445
+ }
426
446
  },
427
447
  "webhookCount": {
428
448
  "type": "number"