losant_rest 1.10.1 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/_schemas.md +26941 -15658
  4. data/docs/application.md +42 -0
  5. data/docs/applicationApiTokens.md +2 -2
  6. data/docs/applicationCertificateAuthorities.md +1 -1
  7. data/docs/applicationCertificates.md +1 -1
  8. data/docs/applicationKeys.md +1 -1
  9. data/docs/applicationTemplate.md +46 -0
  10. data/docs/applicationTemplates.md +77 -2
  11. data/docs/applications.md +1 -1
  12. data/docs/auditLogs.md +1 -1
  13. data/docs/dashboards.md +1 -1
  14. data/docs/dataTables.md +1 -1
  15. data/docs/device.md +6 -3
  16. data/docs/deviceRecipes.md +1 -1
  17. data/docs/devices.md +217 -5
  18. data/docs/edgeDeployments.md +1 -1
  19. data/docs/events.md +1 -1
  20. data/docs/experienceEndpoints.md +1 -0
  21. data/docs/experienceGroups.md +1 -1
  22. data/docs/experienceUsers.md +1 -1
  23. data/docs/experienceVersions.md +1 -1
  24. data/docs/experienceViews.md +1 -1
  25. data/docs/file.md +4 -4
  26. data/docs/files.md +1 -1
  27. data/docs/flow.md +94 -1
  28. data/docs/flowVersion.md +96 -1
  29. data/docs/flowVersions.md +2 -1
  30. data/docs/flows.md +4 -2
  31. data/docs/integrations.md +1 -1
  32. data/docs/me.md +0 -36
  33. data/docs/notebooks.md +1 -1
  34. data/docs/orgs.md +1 -1
  35. data/docs/webhooks.md +1 -1
  36. data/lib/losant_rest.rb +1 -0
  37. data/lib/losant_rest/application.rb +48 -0
  38. data/lib/losant_rest/application_api_tokens.rb +1 -1
  39. data/lib/losant_rest/application_template.rb +79 -0
  40. data/lib/losant_rest/application_templates.rb +89 -1
  41. data/lib/losant_rest/client.rb +6 -2
  42. data/lib/losant_rest/device.rb +9 -3
  43. data/lib/losant_rest/devices.rb +255 -3
  44. data/lib/losant_rest/experience_endpoints.rb +2 -0
  45. data/lib/losant_rest/file.rb +3 -3
  46. data/lib/losant_rest/flow.rb +115 -1
  47. data/lib/losant_rest/flow_version.rb +115 -1
  48. data/lib/losant_rest/flow_versions.rb +3 -0
  49. data/lib/losant_rest/flows.rb +6 -0
  50. data/lib/losant_rest/me.rb +0 -41
  51. data/lib/losant_rest/version.rb +1 -1
  52. data/schemas/advancedDeviceQuery.json +110 -0
  53. data/schemas/advancedEventQuery.json +198 -0
  54. data/schemas/advancedFlowByVersionQuery.json +665 -0
  55. data/schemas/advancedFlowQuery.json +665 -0
  56. data/schemas/advancedFlowVersionQuery.json +707 -0
  57. data/schemas/advancedQuery.json +22 -0
  58. data/schemas/application.json +8 -0
  59. data/schemas/applicationApiTokenPost.json +11 -1
  60. data/schemas/applicationApplyTemplatePatch.json +19 -0
  61. data/schemas/applicationCreationByTemplateResult.json +8 -0
  62. data/schemas/applicationPost.json +8 -0
  63. data/schemas/applicationTemplate.json +20 -0
  64. data/schemas/applicationTemplateCategories.json +43 -0
  65. data/schemas/applicationTemplateCategory.json +23 -0
  66. data/schemas/applicationTemplates.json +32 -0
  67. data/schemas/applications.json +8 -0
  68. data/schemas/attributeNamesResponse.json +14 -0
  69. data/schemas/authedUser.json +3 -0
  70. data/schemas/changePassword.json +2 -2
  71. data/schemas/dashboard.json +175 -25
  72. data/schemas/dashboardPatch.json +175 -25
  73. data/schemas/dashboardPost.json +175 -25
  74. data/schemas/dashboards.json +175 -25
  75. data/schemas/dataExport.json +142 -0
  76. data/schemas/dataTableRowsExport.json +22 -0
  77. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  78. data/schemas/deviceClassFilter.json +1 -2
  79. data/schemas/devicesDataRemoved.json +12 -0
  80. data/schemas/devicesDeletePost.json +1034 -0
  81. data/schemas/devicesDeleted.json +12 -0
  82. data/schemas/devicesExportPost.json +1035 -0
  83. data/schemas/devicesPatch.json +1757 -4
  84. data/schemas/devicesRemoveDataPost.json +1056 -0
  85. data/schemas/devicesUpdated.json +18 -0
  86. data/schemas/eventPost.json +22 -0
  87. data/schemas/eventsExport.json +198 -0
  88. data/schemas/experienceDomain.json +1 -1
  89. data/schemas/experienceDomainPatch.json +1 -1
  90. data/schemas/experienceDomainPost.json +1 -1
  91. data/schemas/experienceDomains.json +1 -1
  92. data/schemas/experienceLinkedResources.json +96 -0
  93. data/schemas/experienceVersion.json +10 -1
  94. data/schemas/experienceVersionPatch.json +9 -0
  95. data/schemas/experienceVersions.json +10 -1
  96. data/schemas/flow.json +32 -0
  97. data/schemas/flowErrors.json +87 -0
  98. data/schemas/flowPatch.json +32 -0
  99. data/schemas/flowPost.json +32 -0
  100. data/schemas/flowStats.json +54 -0
  101. data/schemas/flowVersion.json +64 -0
  102. data/schemas/flowVersionPost.json +32 -0
  103. data/schemas/flowVersions.json +64 -0
  104. data/schemas/flows.json +32 -0
  105. data/schemas/flowsImportPost.json +64 -0
  106. data/schemas/flowsImportResult.json +96 -0
  107. data/schemas/githubLogin.json +17 -4
  108. data/schemas/integration.json +3 -0
  109. data/schemas/integrationPatch.json +3 -0
  110. data/schemas/integrationPost.json +3 -0
  111. data/schemas/integrations.json +3 -0
  112. data/schemas/me.json +3 -3
  113. data/schemas/mePatch.json +2 -2
  114. data/schemas/multiDeviceCommand.json +1019 -0
  115. data/schemas/notebook.json +96 -0
  116. data/schemas/notebookExecutionLogs.json +7 -0
  117. data/schemas/notebookPatch.json +96 -0
  118. data/schemas/notebookPost.json +96 -0
  119. data/schemas/notebooks.json +96 -0
  120. data/schemas/org.json +1 -1
  121. data/schemas/orgInviteInfo.json +3 -0
  122. data/schemas/orgInvitePost.json +3 -0
  123. data/schemas/orgInvites.json +3 -0
  124. data/schemas/orgPatch.json +1 -1
  125. data/schemas/orgs.json +1 -1
  126. data/schemas/passwordResetFinish.json +2 -2
  127. data/schemas/samlResponse.json +1 -1
  128. data/schemas/tagKeysResponse.json +14 -0
  129. data/schemas/tagValuesResponse.json +19 -0
  130. data/schemas/templateKeywords.json +14 -0
  131. data/schemas/timeSeriesData.json +12 -2
  132. data/schemas/timeSeriesQuery.json +94 -14
  133. data/schemas/userCredentials.json +15 -3
  134. data/schemas/userPost.json +23 -7
  135. metadata +27 -6
@@ -422,7 +422,7 @@
422
422
  "type": "array",
423
423
  "items": {
424
424
  "type": "string",
425
- "maxLength": 1024,
425
+ "maxLength": 45,
426
426
  "minLength": 3
427
427
  }
428
428
  }
@@ -28,6 +28,9 @@
28
28
  },
29
29
  "ttl": {
30
30
  "type": "number"
31
+ },
32
+ "disallowTransfer": {
33
+ "type": "boolean"
31
34
  }
32
35
  }
33
36
  }
@@ -68,6 +68,9 @@
68
68
  "additionalProperties": false
69
69
  },
70
70
  "maxItems": 1000
71
+ },
72
+ "disallowTransfer": {
73
+ "type": "boolean"
71
74
  }
72
75
  },
73
76
  "additionalProperties": false,
@@ -84,6 +84,9 @@
84
84
  },
85
85
  "hasExpired": {
86
86
  "type": "boolean"
87
+ },
88
+ "disallowTransfer": {
89
+ "type": "boolean"
87
90
  }
88
91
  }
89
92
  }
@@ -33,7 +33,7 @@
33
33
  "maxItems": 25,
34
34
  "items": {
35
35
  "type": "string",
36
- "maxLength": 1024,
36
+ "maxLength": 45,
37
37
  "minLength": 3
38
38
  }
39
39
  }
@@ -429,7 +429,7 @@
429
429
  "type": "array",
430
430
  "items": {
431
431
  "type": "string",
432
- "maxLength": 1024,
432
+ "maxLength": 45,
433
433
  "minLength": 3
434
434
  }
435
435
  }
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "password": {
15
15
  "type": "string",
16
- "minLength": 8,
16
+ "minLength": 12,
17
17
  "maxLength": 2048,
18
- "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
18
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
19
19
  }
20
20
  },
21
21
  "required": [
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "SAMLDomain": {
11
11
  "type": "string",
12
- "maxLength": 1024,
12
+ "maxLength": 45,
13
13
  "minLength": 3
14
14
  }
15
15
  },
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "tagKeys": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "string",
9
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
10
+ },
11
+ "maxItems": 1000
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "tagKey": {
6
+ "type": "string",
7
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
8
+ },
9
+ "tagValues": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 255
15
+ },
16
+ "maxItems": 1000
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "properties": {
4
+ "keywords": {
5
+ "type": "array",
6
+ "items": {
7
+ "type": "string",
8
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
9
+ },
10
+ "maxItems": 100
11
+ }
12
+ },
13
+ "additionalProperties": false
14
+ }
@@ -89,8 +89,18 @@
89
89
  "type": "object",
90
90
  "properties": {
91
91
  "value": {
92
- "type": "string",
93
- "maxLength": 255
92
+ "oneOf": [
93
+ {
94
+ "type": "string",
95
+ "maxLength": 255
96
+ },
97
+ {
98
+ "type": "number"
99
+ },
100
+ {
101
+ "type": "boolean"
102
+ }
103
+ ]
94
104
  }
95
105
  },
96
106
  "additionalProperties": false,
@@ -17,23 +17,103 @@
17
17
  "aggregation": {
18
18
  "oneOf": [
19
19
  {
20
- "type": "string",
21
- "enum": [
22
- "FIRST",
23
- "LAST",
24
- "COUNT",
25
- "MAX",
26
- "MIN",
27
- "MEDIAN",
28
- "MEAN",
29
- "SUM",
30
- "STD_DEV"
20
+ "oneOf": [
21
+ {
22
+ "type": "string",
23
+ "enum": [
24
+ "FIRST",
25
+ "LAST",
26
+ "COUNT",
27
+ "MAX",
28
+ "MIN",
29
+ "MEDIAN",
30
+ "MEAN",
31
+ "SUM",
32
+ "STD_DEV"
33
+ ]
34
+ },
35
+ {
36
+ "type": "string",
37
+ "enum": [
38
+ "NONE"
39
+ ]
40
+ }
31
41
  ]
32
42
  },
33
43
  {
34
- "type": "string",
35
- "enum": [
36
- "NONE"
44
+ "type": "object",
45
+ "properties": {
46
+ "type": {
47
+ "oneOf": [
48
+ {
49
+ "type": "string",
50
+ "enum": [
51
+ "FIRST",
52
+ "LAST",
53
+ "COUNT",
54
+ "MAX",
55
+ "MIN",
56
+ "MEDIAN",
57
+ "MEAN",
58
+ "SUM",
59
+ "STD_DEV"
60
+ ]
61
+ },
62
+ {
63
+ "type": "string",
64
+ "enum": [
65
+ "NONE"
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ "options": {
71
+ "type": "object",
72
+ "additionalProperties": false
73
+ }
74
+ },
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "type"
78
+ ]
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "type": {
84
+ "type": "string",
85
+ "enum": [
86
+ "TIMEATVALUE"
87
+ ]
88
+ },
89
+ "options": {
90
+ "type": "object",
91
+ "properties": {
92
+ "value": {
93
+ "oneOf": [
94
+ {
95
+ "type": "string",
96
+ "maxLength": 255
97
+ },
98
+ {
99
+ "type": "number"
100
+ },
101
+ {
102
+ "type": "boolean"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "value"
110
+ ]
111
+ }
112
+ },
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "type",
116
+ "options"
37
117
  ]
38
118
  }
39
119
  ]
@@ -78,6 +78,7 @@
78
78
  "notebooks.*",
79
79
  "webhook.*",
80
80
  "webhooks.*",
81
+ "application.applyTemplate",
81
82
  "application.archiveData",
82
83
  "application.backfillArchiveData",
83
84
  "application.clone",
@@ -153,12 +154,17 @@
153
154
  "deviceRecipe.patch",
154
155
  "deviceRecipes.get",
155
156
  "deviceRecipes.post",
157
+ "devices.attributeNames",
156
158
  "devices.patch",
159
+ "devices.delete",
160
+ "devices.removeData",
157
161
  "devices.detailedSummary",
158
162
  "devices.export",
159
163
  "devices.get",
160
164
  "devices.post",
161
165
  "devices.sendCommand",
166
+ "devices.tagKeys",
167
+ "devices.tagValues",
162
168
  "edgeDeployments.get",
163
169
  "edgeDeployments.release",
164
170
  "edgeDeployments.remove",
@@ -224,23 +230,27 @@
224
230
  "file.upload",
225
231
  "files.get",
226
232
  "files.post",
233
+ "flow.clearStorageEntries",
227
234
  "flow.debug",
228
235
  "flow.delete",
229
- "flow.clearStorageEntries",
236
+ "flow.errors",
230
237
  "flow.get",
231
238
  "flow.getStorageEntries",
232
239
  "flow.log",
233
240
  "flow.patch",
234
241
  "flow.pressVirtualButton",
235
242
  "flow.setStorageEntry",
243
+ "flow.stats",
236
244
  "flows.get",
237
245
  "flows.getByVersion",
238
246
  "flows.import",
239
247
  "flows.post",
240
248
  "flowVersion.delete",
249
+ "flowVersion.errors",
241
250
  "flowVersion.get",
242
251
  "flowVersion.log",
243
252
  "flowVersion.patch",
253
+ "flowVersion.stats",
244
254
  "flowVersions.get",
245
255
  "flowVersions.post",
246
256
  "integration.delete",
@@ -308,8 +318,12 @@
308
318
  "enum": [
309
319
  "all.User",
310
320
  "all.User.read",
321
+ "applicationTemplate.*",
322
+ "applicationTemplate.get",
311
323
  "applicationTemplates.*",
312
324
  "applicationTemplates.get",
325
+ "applicationTemplates.getCategories",
326
+ "applicationTemplates.getUniqueKeywords",
313
327
  "me.*",
314
328
  "orgs.*",
315
329
  "me.get",
@@ -321,8 +335,6 @@
321
335
  "me.disableTwoFactorAuth",
322
336
  "me.disconnectGithub",
323
337
  "me.connectGithub",
324
- "me.disconnectTwitter",
325
- "me.connectTwitter",
326
338
  "me.addRecentItem",
327
339
  "me.fetchRecentItems",
328
340
  "me.payloadCounts",
@@ -41,10 +41,14 @@
41
41
  "type": "object",
42
42
  "properties": {
43
43
  "service": {
44
- "type": "string"
44
+ "enum": [
45
+ "github"
46
+ ]
45
47
  },
46
48
  "accessToken": {
47
- "type": "string"
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 1024
48
52
  }
49
53
  },
50
54
  "required": [
@@ -54,9 +58,9 @@
54
58
  },
55
59
  "password": {
56
60
  "type": "string",
57
- "minLength": 8,
61
+ "minLength": 12,
58
62
  "maxLength": 2048,
59
- "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
63
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
60
64
  },
61
65
  "acceptTerms": {
62
66
  "enum": [
@@ -133,6 +137,7 @@
133
137
  "notebooks.*",
134
138
  "webhook.*",
135
139
  "webhooks.*",
140
+ "application.applyTemplate",
136
141
  "application.archiveData",
137
142
  "application.backfillArchiveData",
138
143
  "application.clone",
@@ -208,12 +213,17 @@
208
213
  "deviceRecipe.patch",
209
214
  "deviceRecipes.get",
210
215
  "deviceRecipes.post",
216
+ "devices.attributeNames",
211
217
  "devices.patch",
218
+ "devices.delete",
219
+ "devices.removeData",
212
220
  "devices.detailedSummary",
213
221
  "devices.export",
214
222
  "devices.get",
215
223
  "devices.post",
216
224
  "devices.sendCommand",
225
+ "devices.tagKeys",
226
+ "devices.tagValues",
217
227
  "edgeDeployments.get",
218
228
  "edgeDeployments.release",
219
229
  "edgeDeployments.remove",
@@ -279,23 +289,27 @@
279
289
  "file.upload",
280
290
  "files.get",
281
291
  "files.post",
292
+ "flow.clearStorageEntries",
282
293
  "flow.debug",
283
294
  "flow.delete",
284
- "flow.clearStorageEntries",
295
+ "flow.errors",
285
296
  "flow.get",
286
297
  "flow.getStorageEntries",
287
298
  "flow.log",
288
299
  "flow.patch",
289
300
  "flow.pressVirtualButton",
290
301
  "flow.setStorageEntry",
302
+ "flow.stats",
291
303
  "flows.get",
292
304
  "flows.getByVersion",
293
305
  "flows.import",
294
306
  "flows.post",
295
307
  "flowVersion.delete",
308
+ "flowVersion.errors",
296
309
  "flowVersion.get",
297
310
  "flowVersion.log",
298
311
  "flowVersion.patch",
312
+ "flowVersion.stats",
299
313
  "flowVersions.get",
300
314
  "flowVersions.post",
301
315
  "integration.delete",
@@ -363,8 +377,12 @@
363
377
  "enum": [
364
378
  "all.User",
365
379
  "all.User.read",
380
+ "applicationTemplate.*",
381
+ "applicationTemplate.get",
366
382
  "applicationTemplates.*",
367
383
  "applicationTemplates.get",
384
+ "applicationTemplates.getCategories",
385
+ "applicationTemplates.getUniqueKeywords",
368
386
  "me.*",
369
387
  "orgs.*",
370
388
  "me.get",
@@ -376,8 +394,6 @@
376
394
  "me.disableTwoFactorAuth",
377
395
  "me.disconnectGithub",
378
396
  "me.connectGithub",
379
- "me.disconnectTwitter",
380
- "me.connectTwitter",
381
397
  "me.addRecentItem",
382
398
  "me.fetchRecentItems",
383
399
  "me.payloadCounts",