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.
- checksums.yaml +5 -5
- data/docs/_schemas.md +26390 -4889
- data/docs/device.md +1 -1
- data/docs/devices.md +44 -4
- data/lib/losant_rest/client.rb +2 -2
- data/lib/losant_rest/device.rb +1 -1
- data/lib/losant_rest/devices.rb +52 -4
- data/lib/losant_rest/version.rb +1 -1
- data/schemas/application.json +25 -0
- data/schemas/applicationApiTokenPost.json +1 -0
- data/schemas/applicationPatch.json +25 -0
- data/schemas/applicationPost.json +25 -0
- data/schemas/applications.json +25 -0
- data/schemas/authedDevice.json +2 -1
- data/schemas/dashboard.json +34 -11
- data/schemas/dashboardPatch.json +34 -11
- data/schemas/dashboardPost.json +34 -11
- data/schemas/dashboards.json +34 -11
- data/schemas/device.json +110 -1
- data/schemas/deviceClassFilter.json +31 -0
- data/schemas/devicePatch.json +110 -1
- data/schemas/devicePost.json +110 -1
- data/schemas/deviceRecipe.json +110 -1
- data/schemas/deviceRecipePatch.json +110 -1
- data/schemas/deviceRecipePost.json +110 -1
- data/schemas/deviceRecipes.json +110 -1
- data/schemas/devices.json +123 -2
- data/schemas/devicesPatch.json +209 -0
- data/schemas/flow.json +1491 -54
- data/schemas/flowPatch.json +1491 -54
- data/schemas/flowPost.json +1491 -54
- data/schemas/flowVersion.json +3319 -445
- data/schemas/flowVersionPost.json +1491 -54
- data/schemas/flowVersions.json +3319 -445
- data/schemas/flows.json +1491 -54
- data/schemas/flowsImportPost.json +3313 -439
- data/schemas/flowsImportResult.json +5129 -818
- data/schemas/githubLogin.json +1 -0
- data/schemas/userCredentials.json +1 -0
- data/schemas/userPost.json +1 -0
- metadata +5 -3
data/schemas/dashboardPatch.json
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
"properties": {
|
74
74
|
"id": {
|
75
75
|
"type": "string",
|
76
|
-
"maxLength":
|
76
|
+
"maxLength": 48
|
77
77
|
},
|
78
78
|
"title": {
|
79
79
|
"type": "string",
|
@@ -275,15 +275,34 @@
|
|
275
275
|
"blockType": {
|
276
276
|
"type": "string",
|
277
277
|
"enum": [
|
278
|
-
"custom-chart"
|
278
|
+
"custom-chart",
|
279
|
+
"custom-html"
|
279
280
|
]
|
280
281
|
},
|
281
282
|
"config": {
|
282
283
|
"type": "object",
|
283
284
|
"properties": {
|
284
285
|
"configuration": {
|
285
|
-
"
|
286
|
-
|
286
|
+
"oneOf": [
|
287
|
+
{
|
288
|
+
"type": "object",
|
289
|
+
"properties": {
|
290
|
+
"headContent": {
|
291
|
+
"type": "string",
|
292
|
+
"maxLength": 32767
|
293
|
+
},
|
294
|
+
"bodyContent": {
|
295
|
+
"type": "string",
|
296
|
+
"maxLength": 32767
|
297
|
+
}
|
298
|
+
},
|
299
|
+
"additionalProperties": false
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"type": "string",
|
303
|
+
"maxLength": 32767
|
304
|
+
}
|
305
|
+
]
|
287
306
|
},
|
288
307
|
"segments": {
|
289
308
|
"type": "array",
|
@@ -971,7 +990,7 @@
|
|
971
990
|
"properties": {
|
972
991
|
"id": {
|
973
992
|
"type": "string",
|
974
|
-
"maxLength":
|
993
|
+
"maxLength": 48
|
975
994
|
},
|
976
995
|
"title": {
|
977
996
|
"type": "string",
|
@@ -1437,6 +1456,10 @@
|
|
1437
1456
|
"detectDataGaps": {
|
1438
1457
|
"type": "boolean"
|
1439
1458
|
},
|
1459
|
+
"expression": {
|
1460
|
+
"type": "string",
|
1461
|
+
"maxLength": 255
|
1462
|
+
},
|
1440
1463
|
"graphType": {
|
1441
1464
|
"type": "string",
|
1442
1465
|
"enum": [
|
@@ -2341,7 +2364,7 @@
|
|
2341
2364
|
"properties": {
|
2342
2365
|
"id": {
|
2343
2366
|
"type": "string",
|
2344
|
-
"maxLength":
|
2367
|
+
"maxLength": 48
|
2345
2368
|
},
|
2346
2369
|
"title": {
|
2347
2370
|
"type": "string",
|
@@ -3980,11 +4003,11 @@
|
|
3980
4003
|
"properties": {
|
3981
4004
|
"id": {
|
3982
4005
|
"type": "string",
|
3983
|
-
"
|
4006
|
+
"maxLength": 48
|
3984
4007
|
},
|
3985
4008
|
"cron": {
|
3986
4009
|
"type": "string",
|
3987
|
-
"
|
4010
|
+
"maxLength": 255
|
3988
4011
|
},
|
3989
4012
|
"toEmail": {
|
3990
4013
|
"type": "array",
|
@@ -3998,11 +4021,11 @@
|
|
3998
4021
|
},
|
3999
4022
|
"subject": {
|
4000
4023
|
"type": "string",
|
4001
|
-
"
|
4024
|
+
"maxLength": 255
|
4002
4025
|
},
|
4003
4026
|
"message": {
|
4004
4027
|
"type": "string",
|
4005
|
-
"
|
4028
|
+
"maxLength": 32767
|
4006
4029
|
},
|
4007
4030
|
"theme": {
|
4008
4031
|
"type": "string",
|
@@ -4013,7 +4036,7 @@
|
|
4013
4036
|
},
|
4014
4037
|
"timezone": {
|
4015
4038
|
"type": "string",
|
4016
|
-
"
|
4039
|
+
"maxLength": 255
|
4017
4040
|
}
|
4018
4041
|
},
|
4019
4042
|
"additionalProperties": false,
|
data/schemas/dashboardPost.json
CHANGED
@@ -81,7 +81,7 @@
|
|
81
81
|
"properties": {
|
82
82
|
"id": {
|
83
83
|
"type": "string",
|
84
|
-
"maxLength":
|
84
|
+
"maxLength": 48
|
85
85
|
},
|
86
86
|
"title": {
|
87
87
|
"type": "string",
|
@@ -283,15 +283,34 @@
|
|
283
283
|
"blockType": {
|
284
284
|
"type": "string",
|
285
285
|
"enum": [
|
286
|
-
"custom-chart"
|
286
|
+
"custom-chart",
|
287
|
+
"custom-html"
|
287
288
|
]
|
288
289
|
},
|
289
290
|
"config": {
|
290
291
|
"type": "object",
|
291
292
|
"properties": {
|
292
293
|
"configuration": {
|
293
|
-
"
|
294
|
-
|
294
|
+
"oneOf": [
|
295
|
+
{
|
296
|
+
"type": "object",
|
297
|
+
"properties": {
|
298
|
+
"headContent": {
|
299
|
+
"type": "string",
|
300
|
+
"maxLength": 32767
|
301
|
+
},
|
302
|
+
"bodyContent": {
|
303
|
+
"type": "string",
|
304
|
+
"maxLength": 32767
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"additionalProperties": false
|
308
|
+
},
|
309
|
+
{
|
310
|
+
"type": "string",
|
311
|
+
"maxLength": 32767
|
312
|
+
}
|
313
|
+
]
|
295
314
|
},
|
296
315
|
"segments": {
|
297
316
|
"type": "array",
|
@@ -979,7 +998,7 @@
|
|
979
998
|
"properties": {
|
980
999
|
"id": {
|
981
1000
|
"type": "string",
|
982
|
-
"maxLength":
|
1001
|
+
"maxLength": 48
|
983
1002
|
},
|
984
1003
|
"title": {
|
985
1004
|
"type": "string",
|
@@ -1445,6 +1464,10 @@
|
|
1445
1464
|
"detectDataGaps": {
|
1446
1465
|
"type": "boolean"
|
1447
1466
|
},
|
1467
|
+
"expression": {
|
1468
|
+
"type": "string",
|
1469
|
+
"maxLength": 255
|
1470
|
+
},
|
1448
1471
|
"graphType": {
|
1449
1472
|
"type": "string",
|
1450
1473
|
"enum": [
|
@@ -2349,7 +2372,7 @@
|
|
2349
2372
|
"properties": {
|
2350
2373
|
"id": {
|
2351
2374
|
"type": "string",
|
2352
|
-
"maxLength":
|
2375
|
+
"maxLength": 48
|
2353
2376
|
},
|
2354
2377
|
"title": {
|
2355
2378
|
"type": "string",
|
@@ -4004,11 +4027,11 @@
|
|
4004
4027
|
"properties": {
|
4005
4028
|
"id": {
|
4006
4029
|
"type": "string",
|
4007
|
-
"
|
4030
|
+
"maxLength": 48
|
4008
4031
|
},
|
4009
4032
|
"cron": {
|
4010
4033
|
"type": "string",
|
4011
|
-
"
|
4034
|
+
"maxLength": 255
|
4012
4035
|
},
|
4013
4036
|
"toEmail": {
|
4014
4037
|
"type": "array",
|
@@ -4022,11 +4045,11 @@
|
|
4022
4045
|
},
|
4023
4046
|
"subject": {
|
4024
4047
|
"type": "string",
|
4025
|
-
"
|
4048
|
+
"maxLength": 255
|
4026
4049
|
},
|
4027
4050
|
"message": {
|
4028
4051
|
"type": "string",
|
4029
|
-
"
|
4052
|
+
"maxLength": 32767
|
4030
4053
|
},
|
4031
4054
|
"theme": {
|
4032
4055
|
"type": "string",
|
@@ -4037,7 +4060,7 @@
|
|
4037
4060
|
},
|
4038
4061
|
"timezone": {
|
4039
4062
|
"type": "string",
|
4040
|
-
"
|
4063
|
+
"maxLength": 255
|
4041
4064
|
}
|
4042
4065
|
},
|
4043
4066
|
"additionalProperties": false,
|
data/schemas/dashboards.json
CHANGED
@@ -89,11 +89,11 @@
|
|
89
89
|
"properties": {
|
90
90
|
"id": {
|
91
91
|
"type": "string",
|
92
|
-
"
|
92
|
+
"maxLength": 48
|
93
93
|
},
|
94
94
|
"cron": {
|
95
95
|
"type": "string",
|
96
|
-
"
|
96
|
+
"maxLength": 255
|
97
97
|
},
|
98
98
|
"toEmail": {
|
99
99
|
"type": "array",
|
@@ -107,11 +107,11 @@
|
|
107
107
|
},
|
108
108
|
"subject": {
|
109
109
|
"type": "string",
|
110
|
-
"
|
110
|
+
"maxLength": 255
|
111
111
|
},
|
112
112
|
"message": {
|
113
113
|
"type": "string",
|
114
|
-
"
|
114
|
+
"maxLength": 32767
|
115
115
|
},
|
116
116
|
"theme": {
|
117
117
|
"type": "string",
|
@@ -122,7 +122,7 @@
|
|
122
122
|
},
|
123
123
|
"timezone": {
|
124
124
|
"type": "string",
|
125
|
-
"
|
125
|
+
"maxLength": 255
|
126
126
|
}
|
127
127
|
},
|
128
128
|
"additionalProperties": false,
|
@@ -198,7 +198,7 @@
|
|
198
198
|
"properties": {
|
199
199
|
"id": {
|
200
200
|
"type": "string",
|
201
|
-
"maxLength":
|
201
|
+
"maxLength": 48
|
202
202
|
},
|
203
203
|
"title": {
|
204
204
|
"type": "string",
|
@@ -400,15 +400,34 @@
|
|
400
400
|
"blockType": {
|
401
401
|
"type": "string",
|
402
402
|
"enum": [
|
403
|
-
"custom-chart"
|
403
|
+
"custom-chart",
|
404
|
+
"custom-html"
|
404
405
|
]
|
405
406
|
},
|
406
407
|
"config": {
|
407
408
|
"type": "object",
|
408
409
|
"properties": {
|
409
410
|
"configuration": {
|
410
|
-
"
|
411
|
-
|
411
|
+
"oneOf": [
|
412
|
+
{
|
413
|
+
"type": "object",
|
414
|
+
"properties": {
|
415
|
+
"headContent": {
|
416
|
+
"type": "string",
|
417
|
+
"maxLength": 32767
|
418
|
+
},
|
419
|
+
"bodyContent": {
|
420
|
+
"type": "string",
|
421
|
+
"maxLength": 32767
|
422
|
+
}
|
423
|
+
},
|
424
|
+
"additionalProperties": false
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"type": "string",
|
428
|
+
"maxLength": 32767
|
429
|
+
}
|
430
|
+
]
|
412
431
|
},
|
413
432
|
"segments": {
|
414
433
|
"type": "array",
|
@@ -1096,7 +1115,7 @@
|
|
1096
1115
|
"properties": {
|
1097
1116
|
"id": {
|
1098
1117
|
"type": "string",
|
1099
|
-
"maxLength":
|
1118
|
+
"maxLength": 48
|
1100
1119
|
},
|
1101
1120
|
"title": {
|
1102
1121
|
"type": "string",
|
@@ -1562,6 +1581,10 @@
|
|
1562
1581
|
"detectDataGaps": {
|
1563
1582
|
"type": "boolean"
|
1564
1583
|
},
|
1584
|
+
"expression": {
|
1585
|
+
"type": "string",
|
1586
|
+
"maxLength": 255
|
1587
|
+
},
|
1565
1588
|
"graphType": {
|
1566
1589
|
"type": "string",
|
1567
1590
|
"enum": [
|
@@ -2466,7 +2489,7 @@
|
|
2466
2489
|
"properties": {
|
2467
2490
|
"id": {
|
2468
2491
|
"type": "string",
|
2469
|
-
"maxLength":
|
2492
|
+
"maxLength": 48
|
2470
2493
|
},
|
2471
2494
|
"title": {
|
2472
2495
|
"type": "string",
|
data/schemas/device.json
CHANGED
@@ -71,6 +71,95 @@
|
|
71
71
|
"gps",
|
72
72
|
"boolean"
|
73
73
|
]
|
74
|
+
},
|
75
|
+
"description": {
|
76
|
+
"type": "string",
|
77
|
+
"maxLength": 32767
|
78
|
+
},
|
79
|
+
"attributeTags": {
|
80
|
+
"type": "object",
|
81
|
+
"patternProperties": {
|
82
|
+
"^[0-9a-zA-Z_-]{1,255}$": {
|
83
|
+
"type": "string",
|
84
|
+
"minLength": 1,
|
85
|
+
"maxLength": 255
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"additionalProperties": false
|
89
|
+
},
|
90
|
+
"system": {
|
91
|
+
"type": "object",
|
92
|
+
"properties": {
|
93
|
+
"aggregation": {
|
94
|
+
"type": "string",
|
95
|
+
"enum": [
|
96
|
+
"FIRST",
|
97
|
+
"LAST",
|
98
|
+
"COUNT",
|
99
|
+
"MAX",
|
100
|
+
"MIN",
|
101
|
+
"MEDIAN",
|
102
|
+
"MEAN",
|
103
|
+
"SUM",
|
104
|
+
"STD_DEV",
|
105
|
+
"NONE"
|
106
|
+
]
|
107
|
+
},
|
108
|
+
"childAttributes": {
|
109
|
+
"type": "array",
|
110
|
+
"items": {
|
111
|
+
"type": "object",
|
112
|
+
"properties": {
|
113
|
+
"name": {
|
114
|
+
"type": "string",
|
115
|
+
"pattern": "^[0-9a-zA-Z_-]{1,255}$"
|
116
|
+
},
|
117
|
+
"mode": {
|
118
|
+
"type": "string",
|
119
|
+
"enum": [
|
120
|
+
"all",
|
121
|
+
"whitelist",
|
122
|
+
"blacklist"
|
123
|
+
]
|
124
|
+
},
|
125
|
+
"deviceIds": {
|
126
|
+
"type": "array",
|
127
|
+
"items": {
|
128
|
+
"type": "string",
|
129
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
130
|
+
},
|
131
|
+
"maxItems": 1000
|
132
|
+
},
|
133
|
+
"deviceTags": {
|
134
|
+
"type": "array",
|
135
|
+
"items": {
|
136
|
+
"type": "object",
|
137
|
+
"properties": {
|
138
|
+
"key": {
|
139
|
+
"type": "string",
|
140
|
+
"pattern": "^[0-9a-zA-Z_-]{1,255}$"
|
141
|
+
},
|
142
|
+
"value": {
|
143
|
+
"type": "string",
|
144
|
+
"minLength": 1,
|
145
|
+
"maxLength": 255
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"additionalProperties": false
|
149
|
+
},
|
150
|
+
"maxItems": 100
|
151
|
+
}
|
152
|
+
},
|
153
|
+
"required": [
|
154
|
+
"name",
|
155
|
+
"mode"
|
156
|
+
],
|
157
|
+
"additionalProperties": false
|
158
|
+
},
|
159
|
+
"maxItems": 256
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"additionalProperties": false
|
74
163
|
}
|
75
164
|
},
|
76
165
|
"required": [
|
@@ -88,7 +177,8 @@
|
|
88
177
|
"gateway",
|
89
178
|
"peripheral",
|
90
179
|
"floating",
|
91
|
-
"edgeCompute"
|
180
|
+
"edgeCompute",
|
181
|
+
"system"
|
92
182
|
]
|
93
183
|
},
|
94
184
|
"gatewayId": {
|
@@ -114,6 +204,25 @@
|
|
114
204
|
]
|
115
205
|
}
|
116
206
|
}
|
207
|
+
},
|
208
|
+
"parentId": {
|
209
|
+
"oneOf": [
|
210
|
+
{
|
211
|
+
"type": "string",
|
212
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"type": "null"
|
216
|
+
}
|
217
|
+
]
|
218
|
+
},
|
219
|
+
"systemInterval": {
|
220
|
+
"type": "integer",
|
221
|
+
"minimum": 5,
|
222
|
+
"maximum": 3600
|
223
|
+
},
|
224
|
+
"keepDuplicates": {
|
225
|
+
"type": "boolean"
|
117
226
|
}
|
118
227
|
}
|
119
228
|
}
|