losant_rest 1.8.9 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. data/docs/_schemas.md +26390 -4889
  3. data/docs/device.md +1 -1
  4. data/docs/devices.md +44 -4
  5. data/lib/losant_rest/client.rb +2 -2
  6. data/lib/losant_rest/device.rb +1 -1
  7. data/lib/losant_rest/devices.rb +52 -4
  8. data/lib/losant_rest/version.rb +1 -1
  9. data/schemas/application.json +25 -0
  10. data/schemas/applicationApiTokenPost.json +1 -0
  11. data/schemas/applicationPatch.json +25 -0
  12. data/schemas/applicationPost.json +25 -0
  13. data/schemas/applications.json +25 -0
  14. data/schemas/authedDevice.json +2 -1
  15. data/schemas/dashboard.json +34 -11
  16. data/schemas/dashboardPatch.json +34 -11
  17. data/schemas/dashboardPost.json +34 -11
  18. data/schemas/dashboards.json +34 -11
  19. data/schemas/device.json +110 -1
  20. data/schemas/deviceClassFilter.json +31 -0
  21. data/schemas/devicePatch.json +110 -1
  22. data/schemas/devicePost.json +110 -1
  23. data/schemas/deviceRecipe.json +110 -1
  24. data/schemas/deviceRecipePatch.json +110 -1
  25. data/schemas/deviceRecipePost.json +110 -1
  26. data/schemas/deviceRecipes.json +110 -1
  27. data/schemas/devices.json +123 -2
  28. data/schemas/devicesPatch.json +209 -0
  29. data/schemas/flow.json +1491 -54
  30. data/schemas/flowPatch.json +1491 -54
  31. data/schemas/flowPost.json +1491 -54
  32. data/schemas/flowVersion.json +3319 -445
  33. data/schemas/flowVersionPost.json +1491 -54
  34. data/schemas/flowVersions.json +3319 -445
  35. data/schemas/flows.json +1491 -54
  36. data/schemas/flowsImportPost.json +3313 -439
  37. data/schemas/flowsImportResult.json +5129 -818
  38. data/schemas/githubLogin.json +1 -0
  39. data/schemas/userCredentials.json +1 -0
  40. data/schemas/userPost.json +1 -0
  41. metadata +5 -3
@@ -60,6 +60,95 @@
60
60
  "gps",
61
61
  "boolean"
62
62
  ]
63
+ },
64
+ "description": {
65
+ "type": "string",
66
+ "maxLength": 32767
67
+ },
68
+ "attributeTags": {
69
+ "type": "object",
70
+ "patternProperties": {
71
+ "^[0-9a-zA-Z_-]{1,255}$": {
72
+ "type": "string",
73
+ "minLength": 1,
74
+ "maxLength": 255
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ },
79
+ "system": {
80
+ "type": "object",
81
+ "properties": {
82
+ "aggregation": {
83
+ "type": "string",
84
+ "enum": [
85
+ "FIRST",
86
+ "LAST",
87
+ "COUNT",
88
+ "MAX",
89
+ "MIN",
90
+ "MEDIAN",
91
+ "MEAN",
92
+ "SUM",
93
+ "STD_DEV",
94
+ "NONE"
95
+ ]
96
+ },
97
+ "childAttributes": {
98
+ "type": "array",
99
+ "items": {
100
+ "type": "object",
101
+ "properties": {
102
+ "name": {
103
+ "type": "string",
104
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
105
+ },
106
+ "mode": {
107
+ "type": "string",
108
+ "enum": [
109
+ "all",
110
+ "whitelist",
111
+ "blacklist"
112
+ ]
113
+ },
114
+ "deviceIds": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string",
118
+ "pattern": "^[A-Fa-f\\d]{24}$"
119
+ },
120
+ "maxItems": 1000
121
+ },
122
+ "deviceTags": {
123
+ "type": "array",
124
+ "items": {
125
+ "type": "object",
126
+ "properties": {
127
+ "key": {
128
+ "type": "string",
129
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
130
+ },
131
+ "value": {
132
+ "type": "string",
133
+ "minLength": 1,
134
+ "maxLength": 255
135
+ }
136
+ },
137
+ "additionalProperties": false
138
+ },
139
+ "maxItems": 100
140
+ }
141
+ },
142
+ "required": [
143
+ "name",
144
+ "mode"
145
+ ],
146
+ "additionalProperties": false
147
+ },
148
+ "maxItems": 256
149
+ }
150
+ },
151
+ "additionalProperties": false
63
152
  }
64
153
  },
65
154
  "required": [
@@ -77,12 +166,32 @@
77
166
  "gateway",
78
167
  "peripheral",
79
168
  "floating",
80
- "edgeCompute"
169
+ "edgeCompute",
170
+ "system"
81
171
  ]
82
172
  },
83
173
  "gatewayId": {
84
174
  "type": "string",
85
175
  "pattern": "^[A-Fa-f\\d]{24}$"
176
+ },
177
+ "parentId": {
178
+ "oneOf": [
179
+ {
180
+ "type": "string",
181
+ "pattern": "^[A-Fa-f\\d]{24}$"
182
+ },
183
+ {
184
+ "type": "null"
185
+ }
186
+ ]
187
+ },
188
+ "systemInterval": {
189
+ "type": "integer",
190
+ "minimum": 5,
191
+ "maximum": 3600
192
+ },
193
+ "keepDuplicates": {
194
+ "type": "boolean"
86
195
  }
87
196
  },
88
197
  "additionalProperties": false,
@@ -87,6 +87,95 @@
87
87
  "gps",
88
88
  "boolean"
89
89
  ]
90
+ },
91
+ "description": {
92
+ "type": "string",
93
+ "maxLength": 32767
94
+ },
95
+ "attributeTags": {
96
+ "type": "object",
97
+ "patternProperties": {
98
+ "^[0-9a-zA-Z_-]{1,255}$": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "maxLength": 255
102
+ }
103
+ },
104
+ "additionalProperties": false
105
+ },
106
+ "system": {
107
+ "type": "object",
108
+ "properties": {
109
+ "aggregation": {
110
+ "type": "string",
111
+ "enum": [
112
+ "FIRST",
113
+ "LAST",
114
+ "COUNT",
115
+ "MAX",
116
+ "MIN",
117
+ "MEDIAN",
118
+ "MEAN",
119
+ "SUM",
120
+ "STD_DEV",
121
+ "NONE"
122
+ ]
123
+ },
124
+ "childAttributes": {
125
+ "type": "array",
126
+ "items": {
127
+ "type": "object",
128
+ "properties": {
129
+ "name": {
130
+ "type": "string",
131
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
132
+ },
133
+ "mode": {
134
+ "type": "string",
135
+ "enum": [
136
+ "all",
137
+ "whitelist",
138
+ "blacklist"
139
+ ]
140
+ },
141
+ "deviceIds": {
142
+ "type": "array",
143
+ "items": {
144
+ "type": "string",
145
+ "pattern": "^[A-Fa-f\\d]{24}$"
146
+ },
147
+ "maxItems": 1000
148
+ },
149
+ "deviceTags": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "object",
153
+ "properties": {
154
+ "key": {
155
+ "type": "string",
156
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
157
+ },
158
+ "value": {
159
+ "type": "string",
160
+ "minLength": 1,
161
+ "maxLength": 255
162
+ }
163
+ },
164
+ "additionalProperties": false
165
+ },
166
+ "maxItems": 100
167
+ }
168
+ },
169
+ "required": [
170
+ "name",
171
+ "mode"
172
+ ],
173
+ "additionalProperties": false
174
+ },
175
+ "maxItems": 256
176
+ }
177
+ },
178
+ "additionalProperties": false
90
179
  }
91
180
  },
92
181
  "required": [
@@ -104,12 +193,32 @@
104
193
  "gateway",
105
194
  "peripheral",
106
195
  "floating",
107
- "edgeCompute"
196
+ "edgeCompute",
197
+ "system"
108
198
  ]
109
199
  },
110
200
  "gatewayId": {
111
201
  "type": "string",
112
202
  "pattern": "^[A-Fa-f\\d]{24}$"
203
+ },
204
+ "parentId": {
205
+ "oneOf": [
206
+ {
207
+ "type": "string",
208
+ "pattern": "^[A-Fa-f\\d]{24}$"
209
+ },
210
+ {
211
+ "type": "null"
212
+ }
213
+ ]
214
+ },
215
+ "systemInterval": {
216
+ "type": "integer",
217
+ "minimum": 5,
218
+ "maximum": 3600
219
+ },
220
+ "keepDuplicates": {
221
+ "type": "boolean"
113
222
  }
114
223
  }
115
224
  }
data/schemas/devices.json CHANGED
@@ -78,6 +78,95 @@
78
78
  "gps",
79
79
  "boolean"
80
80
  ]
81
+ },
82
+ "description": {
83
+ "type": "string",
84
+ "maxLength": 32767
85
+ },
86
+ "attributeTags": {
87
+ "type": "object",
88
+ "patternProperties": {
89
+ "^[0-9a-zA-Z_-]{1,255}$": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "maxLength": 255
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ },
97
+ "system": {
98
+ "type": "object",
99
+ "properties": {
100
+ "aggregation": {
101
+ "type": "string",
102
+ "enum": [
103
+ "FIRST",
104
+ "LAST",
105
+ "COUNT",
106
+ "MAX",
107
+ "MIN",
108
+ "MEDIAN",
109
+ "MEAN",
110
+ "SUM",
111
+ "STD_DEV",
112
+ "NONE"
113
+ ]
114
+ },
115
+ "childAttributes": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "object",
119
+ "properties": {
120
+ "name": {
121
+ "type": "string",
122
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
123
+ },
124
+ "mode": {
125
+ "type": "string",
126
+ "enum": [
127
+ "all",
128
+ "whitelist",
129
+ "blacklist"
130
+ ]
131
+ },
132
+ "deviceIds": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "string",
136
+ "pattern": "^[A-Fa-f\\d]{24}$"
137
+ },
138
+ "maxItems": 1000
139
+ },
140
+ "deviceTags": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "object",
144
+ "properties": {
145
+ "key": {
146
+ "type": "string",
147
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
148
+ },
149
+ "value": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 255
153
+ }
154
+ },
155
+ "additionalProperties": false
156
+ },
157
+ "maxItems": 100
158
+ }
159
+ },
160
+ "required": [
161
+ "name",
162
+ "mode"
163
+ ],
164
+ "additionalProperties": false
165
+ },
166
+ "maxItems": 256
167
+ }
168
+ },
169
+ "additionalProperties": false
81
170
  }
82
171
  },
83
172
  "required": [
@@ -95,7 +184,8 @@
95
184
  "gateway",
96
185
  "peripheral",
97
186
  "floating",
98
- "edgeCompute"
187
+ "edgeCompute",
188
+ "system"
99
189
  ]
100
190
  },
101
191
  "gatewayId": {
@@ -121,6 +211,25 @@
121
211
  ]
122
212
  }
123
213
  }
214
+ },
215
+ "parentId": {
216
+ "oneOf": [
217
+ {
218
+ "type": "string",
219
+ "pattern": "^[A-Fa-f\\d]{24}$"
220
+ },
221
+ {
222
+ "type": "null"
223
+ }
224
+ ]
225
+ },
226
+ "systemInterval": {
227
+ "type": "integer",
228
+ "minimum": 5,
229
+ "maximum": 3600
230
+ },
231
+ "keepDuplicates": {
232
+ "type": "boolean"
124
233
  }
125
234
  }
126
235
  }
@@ -167,7 +276,8 @@
167
276
  "gateway",
168
277
  "peripheral",
169
278
  "floating",
170
- "edgeCompute"
279
+ "edgeCompute",
280
+ "system"
171
281
  ]
172
282
  },
173
283
  "tagFilter": {
@@ -190,6 +300,17 @@
190
300
  "additionalProperties": false
191
301
  },
192
302
  "maxItems": 100
303
+ },
304
+ "parentId": {
305
+ "oneOf": [
306
+ {
307
+ "type": "string",
308
+ "pattern": "^[A-Fa-f\\d]{24}$"
309
+ },
310
+ {
311
+ "type": "null"
312
+ }
313
+ ]
193
314
  }
194
315
  }
195
316
  }
@@ -0,0 +1,209 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "updateFields": {
6
+ "title": "Device Patch",
7
+ "description": "Schema for the body of a Device modification request",
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 255
14
+ },
15
+ "description": {
16
+ "type": "string",
17
+ "maxLength": 32767
18
+ },
19
+ "tags": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "properties": {
24
+ "key": {
25
+ "type": "string",
26
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
27
+ },
28
+ "value": {
29
+ "type": "string",
30
+ "minLength": 1,
31
+ "maxLength": 255
32
+ }
33
+ },
34
+ "required": [
35
+ "key",
36
+ "value"
37
+ ],
38
+ "additionalProperties": false
39
+ },
40
+ "maxItems": 100
41
+ },
42
+ "attributes": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "object",
46
+ "properties": {
47
+ "name": {
48
+ "type": "string",
49
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
50
+ },
51
+ "dataType": {
52
+ "type": "string",
53
+ "enum": [
54
+ "string",
55
+ "number",
56
+ "gps",
57
+ "boolean"
58
+ ]
59
+ },
60
+ "description": {
61
+ "type": "string",
62
+ "maxLength": 32767
63
+ },
64
+ "attributeTags": {
65
+ "type": "object",
66
+ "patternProperties": {
67
+ "^[0-9a-zA-Z_-]{1,255}$": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 255
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ "system": {
76
+ "type": "object",
77
+ "properties": {
78
+ "aggregation": {
79
+ "type": "string",
80
+ "enum": [
81
+ "FIRST",
82
+ "LAST",
83
+ "COUNT",
84
+ "MAX",
85
+ "MIN",
86
+ "MEDIAN",
87
+ "MEAN",
88
+ "SUM",
89
+ "STD_DEV",
90
+ "NONE"
91
+ ]
92
+ },
93
+ "childAttributes": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "object",
97
+ "properties": {
98
+ "name": {
99
+ "type": "string",
100
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
101
+ },
102
+ "mode": {
103
+ "type": "string",
104
+ "enum": [
105
+ "all",
106
+ "whitelist",
107
+ "blacklist"
108
+ ]
109
+ },
110
+ "deviceIds": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string",
114
+ "pattern": "^[A-Fa-f\\d]{24}$"
115
+ },
116
+ "maxItems": 1000
117
+ },
118
+ "deviceTags": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "properties": {
123
+ "key": {
124
+ "type": "string",
125
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
126
+ },
127
+ "value": {
128
+ "type": "string",
129
+ "minLength": 1,
130
+ "maxLength": 255
131
+ }
132
+ },
133
+ "additionalProperties": false
134
+ },
135
+ "maxItems": 100
136
+ }
137
+ },
138
+ "required": [
139
+ "name",
140
+ "mode"
141
+ ],
142
+ "additionalProperties": false
143
+ },
144
+ "maxItems": 256
145
+ }
146
+ },
147
+ "additionalProperties": false
148
+ }
149
+ },
150
+ "required": [
151
+ "name",
152
+ "dataType"
153
+ ],
154
+ "additionalProperties": false
155
+ },
156
+ "maxItems": 256
157
+ },
158
+ "deviceClass": {
159
+ "type": "string",
160
+ "enum": [
161
+ "standalone",
162
+ "gateway",
163
+ "peripheral",
164
+ "floating",
165
+ "edgeCompute",
166
+ "system"
167
+ ]
168
+ },
169
+ "gatewayId": {
170
+ "type": "string",
171
+ "pattern": "^[A-Fa-f\\d]{24}$"
172
+ },
173
+ "parentId": {
174
+ "oneOf": [
175
+ {
176
+ "type": "string",
177
+ "pattern": "^[A-Fa-f\\d]{24}$"
178
+ },
179
+ {
180
+ "type": "null"
181
+ }
182
+ ]
183
+ },
184
+ "systemInterval": {
185
+ "type": "integer",
186
+ "minimum": 5,
187
+ "maximum": 3600
188
+ },
189
+ "keepDuplicates": {
190
+ "type": "boolean"
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ },
195
+ "deviceIds": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string",
199
+ "pattern": "^[A-Fa-f\\d]{24}$"
200
+ },
201
+ "maxItems": 1000
202
+ }
203
+ },
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "updateFields",
207
+ "deviceIds"
208
+ ]
209
+ }