losant_rest 1.9.3 → 1.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +17405 -2766
  3. data/docs/application.md +85 -0
  4. data/docs/applicationApiTokens.md +1 -1
  5. data/docs/applicationTemplate.md +46 -0
  6. data/docs/applicationTemplates.md +76 -1
  7. data/docs/device.md +7 -3
  8. data/docs/devices.md +92 -4
  9. data/docs/experienceEndpoints.md +1 -0
  10. data/docs/file.md +4 -4
  11. data/docs/flow.md +94 -1
  12. data/docs/flowVersion.md +96 -1
  13. data/docs/me.md +0 -36
  14. data/lib/losant_rest.rb +1 -0
  15. data/lib/losant_rest/application.rb +48 -0
  16. data/lib/losant_rest/application_api_tokens.rb +1 -1
  17. data/lib/losant_rest/application_template.rb +79 -0
  18. data/lib/losant_rest/application_templates.rb +89 -1
  19. data/lib/losant_rest/client.rb +6 -2
  20. data/lib/losant_rest/device.rb +11 -3
  21. data/lib/losant_rest/devices.rb +103 -3
  22. data/lib/losant_rest/experience_endpoints.rb +2 -0
  23. data/lib/losant_rest/file.rb +3 -3
  24. data/lib/losant_rest/flow.rb +115 -1
  25. data/lib/losant_rest/flow_version.rb +115 -1
  26. data/lib/losant_rest/me.rb +0 -41
  27. data/lib/losant_rest/version.rb +1 -1
  28. data/schemas/advancedDeviceQuery.json +117 -0
  29. data/schemas/advancedEventQuery.json +205 -0
  30. data/schemas/advancedQuery.json +34 -3
  31. data/schemas/application.json +13 -0
  32. data/schemas/applicationApiTokenPost.json +9 -1
  33. data/schemas/applicationApplyTemplatePatch.json +19 -0
  34. data/schemas/applicationCreationByTemplateResult.json +13 -0
  35. data/schemas/applicationPatch.json +5 -0
  36. data/schemas/applicationPost.json +13 -0
  37. data/schemas/applicationTemplate.json +32 -0
  38. data/schemas/applicationTemplateCategories.json +43 -0
  39. data/schemas/applicationTemplateCategory.json +23 -0
  40. data/schemas/applicationTemplates.json +44 -0
  41. data/schemas/applications.json +13 -0
  42. data/schemas/changePassword.json +2 -2
  43. data/schemas/dashboard.json +1285 -145
  44. data/schemas/dashboardPatch.json +1285 -145
  45. data/schemas/dashboardPost.json +1285 -145
  46. data/schemas/dashboards.json +1285 -145
  47. data/schemas/dataExport.json +142 -0
  48. data/schemas/dataTableRowsExport.json +34 -3
  49. data/schemas/device.json +16 -3
  50. data/schemas/devicePatch.json +16 -3
  51. data/schemas/devicePost.json +16 -3
  52. data/schemas/deviceRecipe.json +16 -3
  53. data/schemas/deviceRecipePatch.json +16 -3
  54. data/schemas/deviceRecipePost.json +16 -3
  55. data/schemas/deviceRecipes.json +16 -3
  56. data/schemas/devices.json +16 -3
  57. data/schemas/devicesDataRemoved.json +12 -0
  58. data/schemas/devicesDeletePost.json +1034 -0
  59. data/schemas/devicesDeleted.json +12 -0
  60. data/schemas/devicesExportPost.json +1035 -0
  61. data/schemas/devicesPatch.json +1773 -7
  62. data/schemas/devicesRemoveDataPost.json +1056 -0
  63. data/schemas/devicesUpdated.json +18 -0
  64. data/schemas/eventPost.json +22 -0
  65. data/schemas/eventsExport.json +205 -0
  66. data/schemas/experienceDomain.json +1 -1
  67. data/schemas/experienceDomainPatch.json +1 -1
  68. data/schemas/experienceDomainPost.json +1 -1
  69. data/schemas/experienceDomains.json +1 -1
  70. data/schemas/experienceGroup.json +7 -0
  71. data/schemas/experienceGroupPatch.json +7 -0
  72. data/schemas/experienceGroupPost.json +7 -0
  73. data/schemas/experienceGroups.json +7 -0
  74. data/schemas/experienceLinkedResources.json +348 -3
  75. data/schemas/experienceVersion.json +1 -1
  76. data/schemas/experienceVersions.json +1 -1
  77. data/schemas/flow.json +116 -1
  78. data/schemas/flowErrors.json +87 -0
  79. data/schemas/flowPatch.json +116 -1
  80. data/schemas/flowPost.json +116 -1
  81. data/schemas/flowStats.json +54 -0
  82. data/schemas/flowVersion.json +232 -2
  83. data/schemas/flowVersionPost.json +116 -1
  84. data/schemas/flowVersions.json +232 -2
  85. data/schemas/flows.json +116 -1
  86. data/schemas/flowsImportPost.json +232 -2
  87. data/schemas/flowsImportResult.json +348 -3
  88. data/schemas/githubLogin.json +15 -4
  89. data/schemas/me.json +0 -3
  90. data/schemas/mePatch.json +2 -2
  91. data/schemas/multiDeviceCommand.json +1019 -0
  92. data/schemas/notebook.json +99 -2
  93. data/schemas/notebookPatch.json +99 -2
  94. data/schemas/notebookPost.json +99 -2
  95. data/schemas/notebooks.json +99 -2
  96. data/schemas/org.json +1 -1
  97. data/schemas/orgInviteInfo.json +3 -0
  98. data/schemas/orgInvitePost.json +3 -0
  99. data/schemas/orgInvites.json +3 -0
  100. data/schemas/orgPatch.json +1 -1
  101. data/schemas/orgPost.json +0 -9
  102. data/schemas/orgs.json +1 -1
  103. data/schemas/passwordResetFinish.json +2 -2
  104. data/schemas/samlResponse.json +1 -1
  105. data/schemas/templateKeywords.json +14 -0
  106. data/schemas/timeSeriesData.json +101 -12
  107. data/schemas/timeSeriesQuery.json +101 -12
  108. data/schemas/userCredentials.json +13 -3
  109. data/schemas/userPost.json +21 -7
  110. metadata +19 -5
@@ -6,17 +6,26 @@
6
6
  "type": "array",
7
7
  "items": {
8
8
  "$ref": "#/definitions/advancedQuery"
9
- }
9
+ },
10
+ "maxItems": 100
10
11
  },
11
12
  "$or": {
12
13
  "type": "array",
13
14
  "items": {
14
15
  "$ref": "#/definitions/advancedQuery"
15
- }
16
+ },
17
+ "maxItems": 100
18
+ },
19
+ "$nor": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "#/definitions/advancedQuery"
23
+ },
24
+ "maxItems": 100
16
25
  }
17
26
  },
18
27
  "patternProperties": {
19
- "^[0-9a-zA-Z_-]{1,255}": {
28
+ "^[0-9a-zA-Z_-]{1,255}$": {
20
29
  "oneOf": [
21
30
  {
22
31
  "type": [
@@ -91,6 +100,28 @@
91
100
  },
92
101
  "$ci": {
93
102
  "type": "boolean"
103
+ },
104
+ "$in": {
105
+ "type": "array",
106
+ "maxItems": 100,
107
+ "items": {
108
+ "type": [
109
+ "string",
110
+ "number",
111
+ "boolean"
112
+ ]
113
+ }
114
+ },
115
+ "$nin": {
116
+ "type": "array",
117
+ "maxItems": 100,
118
+ "items": {
119
+ "type": [
120
+ "string",
121
+ "number",
122
+ "boolean"
123
+ ]
124
+ }
94
125
  }
95
126
  },
96
127
  "additionalProperties": false
@@ -18,6 +18,14 @@
18
18
  "type": "string",
19
19
  "format": "date-time"
20
20
  },
21
+ "appliedTemplateIds": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string",
25
+ "pattern": "^[A-Fa-f\\d]{24}$"
26
+ },
27
+ "maxItems": 1000
28
+ },
21
29
  "ownerId": {
22
30
  "type": "string",
23
31
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -91,6 +99,11 @@
91
99
  ]
92
100
  }
93
101
  },
102
+ "blobUrlTTL": {
103
+ "type": "number",
104
+ "minimum": 3600,
105
+ "maximum": 604800
106
+ },
94
107
  "summary": {
95
108
  "type": "object",
96
109
  "properties": {
@@ -73,10 +73,12 @@
73
73
  "notebooks.*",
74
74
  "webhook.*",
75
75
  "webhooks.*",
76
+ "application.applyTemplate",
76
77
  "application.archiveData",
77
78
  "application.backfillArchiveData",
78
79
  "application.clone",
79
80
  "application.export",
81
+ "application.import",
80
82
  "application.fullEventsArchive",
81
83
  "application.fullDataTablesArchive",
82
84
  "application.debug",
@@ -148,6 +150,8 @@
148
150
  "deviceRecipes.get",
149
151
  "deviceRecipes.post",
150
152
  "devices.patch",
153
+ "devices.delete",
154
+ "devices.removeData",
151
155
  "devices.detailedSummary",
152
156
  "devices.export",
153
157
  "devices.get",
@@ -218,23 +222,27 @@
218
222
  "file.upload",
219
223
  "files.get",
220
224
  "files.post",
225
+ "flow.clearStorageEntries",
221
226
  "flow.debug",
222
227
  "flow.delete",
223
- "flow.clearStorageEntries",
228
+ "flow.errors",
224
229
  "flow.get",
225
230
  "flow.getStorageEntries",
226
231
  "flow.log",
227
232
  "flow.patch",
228
233
  "flow.pressVirtualButton",
229
234
  "flow.setStorageEntry",
235
+ "flow.stats",
230
236
  "flows.get",
231
237
  "flows.getByVersion",
232
238
  "flows.import",
233
239
  "flows.post",
234
240
  "flowVersion.delete",
241
+ "flowVersion.errors",
235
242
  "flowVersion.get",
236
243
  "flowVersion.log",
237
244
  "flowVersion.patch",
245
+ "flowVersion.stats",
238
246
  "flowVersions.get",
239
247
  "flowVersions.post",
240
248
  "integration.delete",
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "templateId": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "email": {
10
+ "type": "string",
11
+ "format": "email",
12
+ "maxLength": 1024
13
+ }
14
+ },
15
+ "required": [
16
+ "templateId"
17
+ ],
18
+ "additionalProperties": false
19
+ }
@@ -23,6 +23,14 @@
23
23
  "type": "string",
24
24
  "format": "date-time"
25
25
  },
26
+ "appliedTemplateIds": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string",
30
+ "pattern": "^[A-Fa-f\\d]{24}$"
31
+ },
32
+ "maxItems": 1000
33
+ },
26
34
  "ownerId": {
27
35
  "type": "string",
28
36
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -96,6 +104,11 @@
96
104
  ]
97
105
  }
98
106
  },
107
+ "blobUrlTTL": {
108
+ "type": "number",
109
+ "minimum": 3600,
110
+ "maximum": 604800
111
+ },
99
112
  "summary": {
100
113
  "type": "object",
101
114
  "properties": {
@@ -236,6 +236,11 @@
236
236
  }
237
237
  },
238
238
  "additionalProperties": false
239
+ },
240
+ "blobUrlTTL": {
241
+ "type": "number",
242
+ "minimum": 3600,
243
+ "maximum": 604800
239
244
  }
240
245
  },
241
246
  "additionalProperties": false
@@ -19,6 +19,14 @@
19
19
  "type": "string",
20
20
  "maxLength": 1024
21
21
  },
22
+ "appliedTemplateIds": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string",
26
+ "pattern": "^[A-Fa-f\\d]{24}$"
27
+ },
28
+ "maxItems": 1000
29
+ },
22
30
  "endpointSlug": {
23
31
  "type": "string",
24
32
  "minLength": 4,
@@ -215,6 +223,11 @@
215
223
  }
216
224
  },
217
225
  "additionalProperties": false
226
+ },
227
+ "blobUrlTTL": {
228
+ "type": "number",
229
+ "minimum": 3600,
230
+ "maximum": 604800
218
231
  }
219
232
  },
220
233
  "additionalProperties": false,
@@ -19,6 +19,26 @@
19
19
  "minLength": 1,
20
20
  "maxLength": 255
21
21
  },
22
+ "readme": {
23
+ "type": "string",
24
+ "maxLength": 131072
25
+ },
26
+ "categoryIds": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string",
30
+ "pattern": "^[A-Fa-f\\d]{24}$"
31
+ },
32
+ "maxItems": 1000
33
+ },
34
+ "keywords": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string",
38
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
39
+ },
40
+ "maxItems": 100
41
+ },
22
42
  "description": {
23
43
  "type": "string",
24
44
  "maxLength": 1024
@@ -26,10 +46,22 @@
26
46
  "public": {
27
47
  "type": "boolean"
28
48
  },
49
+ "authorName": {
50
+ "type": "string",
51
+ "maxLength": 255
52
+ },
29
53
  "imageUrl": {
30
54
  "type": "string",
31
55
  "maxLength": 1024
32
56
  },
57
+ "authorUrl": {
58
+ "type": "string",
59
+ "maxLength": 1024
60
+ },
61
+ "templateUrl": {
62
+ "type": "string",
63
+ "maxLength": 1024
64
+ },
33
65
  "summary": {
34
66
  "type": "object",
35
67
  "properties": {
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Application Template Category",
9
+ "description": "Schema for a single Application Template Category",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "parentId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 255
24
+ },
25
+ "description": {
26
+ "type": "string",
27
+ "maxLength": 32767
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "baseId": {
33
+ "type": "string",
34
+ "pattern": "^[A-Fa-f\\d]{24}$"
35
+ },
36
+ "count": {
37
+ "type": "integer"
38
+ },
39
+ "totalCount": {
40
+ "type": "integer"
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "parentId": {
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
+ }
23
+ }
@@ -26,6 +26,26 @@
26
26
  "minLength": 1,
27
27
  "maxLength": 255
28
28
  },
29
+ "readme": {
30
+ "type": "string",
31
+ "maxLength": 131072
32
+ },
33
+ "categoryIds": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string",
37
+ "pattern": "^[A-Fa-f\\d]{24}$"
38
+ },
39
+ "maxItems": 1000
40
+ },
41
+ "keywords": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "string",
45
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
46
+ },
47
+ "maxItems": 100
48
+ },
29
49
  "description": {
30
50
  "type": "string",
31
51
  "maxLength": 1024
@@ -33,10 +53,22 @@
33
53
  "public": {
34
54
  "type": "boolean"
35
55
  },
56
+ "authorName": {
57
+ "type": "string",
58
+ "maxLength": 255
59
+ },
36
60
  "imageUrl": {
37
61
  "type": "string",
38
62
  "maxLength": 1024
39
63
  },
64
+ "authorUrl": {
65
+ "type": "string",
66
+ "maxLength": 1024
67
+ },
68
+ "templateUrl": {
69
+ "type": "string",
70
+ "maxLength": 1024
71
+ },
40
72
  "summary": {
41
73
  "type": "object",
42
74
  "properties": {
@@ -111,6 +143,18 @@
111
143
  "filterField": {
112
144
  "type": "string"
113
145
  },
146
+ "categoryId": {
147
+ "type": "string",
148
+ "pattern": "^[A-Fa-f\\d]{24}$"
149
+ },
150
+ "keywords": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string",
154
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
155
+ },
156
+ "maxItems": 100
157
+ },
114
158
  "sortField": {
115
159
  "type": "string"
116
160
  },
@@ -25,6 +25,14 @@
25
25
  "type": "string",
26
26
  "format": "date-time"
27
27
  },
28
+ "appliedTemplateIds": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string",
32
+ "pattern": "^[A-Fa-f\\d]{24}$"
33
+ },
34
+ "maxItems": 1000
35
+ },
28
36
  "ownerId": {
29
37
  "type": "string",
30
38
  "pattern": "^[A-Fa-f\\d]{24}$"
@@ -98,6 +106,11 @@
98
106
  ]
99
107
  }
100
108
  },
109
+ "blobUrlTTL": {
110
+ "type": "number",
111
+ "minimum": 3600,
112
+ "maximum": 604800
113
+ },
101
114
  "summary": {
102
115
  "type": "object",
103
116
  "properties": {
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "newPassword": {
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-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
19
19
  },
20
20
  "invalidateExistingTokens": {
21
21
  "type": "boolean"