losant_rest 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +18838 -4104
  3. data/docs/application.md +85 -0
  4. data/docs/applicationApiTokens.md +2 -2
  5. data/docs/applicationCertificateAuthorities.md +1 -1
  6. data/docs/applicationCertificates.md +1 -1
  7. data/docs/applicationKeys.md +1 -1
  8. data/docs/applicationTemplate.md +46 -0
  9. data/docs/applicationTemplates.md +77 -2
  10. data/docs/applications.md +1 -1
  11. data/docs/auditLogs.md +1 -1
  12. data/docs/dashboards.md +1 -1
  13. data/docs/dataTables.md +1 -1
  14. data/docs/device.md +7 -3
  15. data/docs/deviceRecipes.md +1 -1
  16. data/docs/devices.md +93 -5
  17. data/docs/edgeDeployments.md +1 -1
  18. data/docs/events.md +1 -1
  19. data/docs/experienceEndpoints.md +1 -0
  20. data/docs/experienceGroups.md +1 -1
  21. data/docs/experienceUsers.md +1 -1
  22. data/docs/experienceVersions.md +1 -1
  23. data/docs/experienceViews.md +1 -1
  24. data/docs/file.md +4 -4
  25. data/docs/files.md +1 -1
  26. data/docs/flow.md +94 -1
  27. data/docs/flowVersion.md +96 -1
  28. data/docs/flowVersions.md +1 -1
  29. data/docs/flows.md +2 -2
  30. data/docs/integrations.md +1 -1
  31. data/docs/me.md +0 -36
  32. data/docs/notebooks.md +1 -1
  33. data/docs/orgs.md +1 -1
  34. data/docs/webhooks.md +1 -1
  35. data/lib/losant_rest.rb +1 -0
  36. data/lib/losant_rest/application.rb +48 -0
  37. data/lib/losant_rest/application_api_tokens.rb +1 -1
  38. data/lib/losant_rest/application_template.rb +79 -0
  39. data/lib/losant_rest/application_templates.rb +89 -1
  40. data/lib/losant_rest/client.rb +6 -2
  41. data/lib/losant_rest/device.rb +11 -3
  42. data/lib/losant_rest/devices.rb +103 -3
  43. data/lib/losant_rest/experience_endpoints.rb +2 -0
  44. data/lib/losant_rest/file.rb +3 -3
  45. data/lib/losant_rest/flow.rb +115 -1
  46. data/lib/losant_rest/flow_version.rb +115 -1
  47. data/lib/losant_rest/me.rb +0 -41
  48. data/lib/losant_rest/version.rb +1 -1
  49. data/schemas/advancedDeviceQuery.json +110 -0
  50. data/schemas/advancedEventQuery.json +198 -0
  51. data/schemas/advancedQuery.json +22 -0
  52. data/schemas/application.json +13 -0
  53. data/schemas/applicationApiTokenPost.json +10 -1
  54. data/schemas/applicationApplyTemplatePatch.json +19 -0
  55. data/schemas/applicationCreationByTemplateResult.json +13 -0
  56. data/schemas/applicationPatch.json +5 -0
  57. data/schemas/applicationPost.json +13 -0
  58. data/schemas/applicationTemplate.json +20 -0
  59. data/schemas/applicationTemplateCategories.json +43 -0
  60. data/schemas/applicationTemplateCategory.json +23 -0
  61. data/schemas/applicationTemplates.json +32 -0
  62. data/schemas/applications.json +13 -0
  63. data/schemas/authedUser.json +3 -0
  64. data/schemas/changePassword.json +2 -2
  65. data/schemas/dashboard.json +1288 -145
  66. data/schemas/dashboardPatch.json +1288 -145
  67. data/schemas/dashboardPost.json +1288 -145
  68. data/schemas/dashboards.json +1288 -145
  69. data/schemas/dataExport.json +142 -0
  70. data/schemas/dataTableRowsExport.json +22 -0
  71. data/schemas/device.json +16 -3
  72. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  73. data/schemas/deviceClassFilter.json +1 -2
  74. data/schemas/devicePatch.json +16 -3
  75. data/schemas/devicePost.json +16 -3
  76. data/schemas/deviceRecipe.json +16 -3
  77. data/schemas/deviceRecipePatch.json +16 -3
  78. data/schemas/deviceRecipePost.json +16 -3
  79. data/schemas/deviceRecipes.json +16 -3
  80. data/schemas/devices.json +16 -3
  81. data/schemas/devicesDataRemoved.json +12 -0
  82. data/schemas/devicesDeletePost.json +1034 -0
  83. data/schemas/devicesDeleted.json +12 -0
  84. data/schemas/devicesExportPost.json +1035 -0
  85. data/schemas/devicesPatch.json +1773 -7
  86. data/schemas/devicesRemoveDataPost.json +1056 -0
  87. data/schemas/devicesUpdated.json +18 -0
  88. data/schemas/eventPost.json +22 -0
  89. data/schemas/eventsExport.json +198 -0
  90. data/schemas/experienceDomain.json +1 -1
  91. data/schemas/experienceDomainPatch.json +1 -1
  92. data/schemas/experienceDomainPost.json +1 -1
  93. data/schemas/experienceDomains.json +1 -1
  94. data/schemas/experienceLinkedResources.json +372 -3
  95. data/schemas/experienceVersion.json +1 -1
  96. data/schemas/experienceVersions.json +1 -1
  97. data/schemas/flow.json +124 -1
  98. data/schemas/flowErrors.json +87 -0
  99. data/schemas/flowPatch.json +124 -1
  100. data/schemas/flowPost.json +124 -1
  101. data/schemas/flowStats.json +54 -0
  102. data/schemas/flowVersion.json +248 -2
  103. data/schemas/flowVersionPost.json +124 -1
  104. data/schemas/flowVersions.json +248 -2
  105. data/schemas/flows.json +124 -1
  106. data/schemas/flowsImportPost.json +248 -2
  107. data/schemas/flowsImportResult.json +372 -3
  108. data/schemas/githubLogin.json +16 -4
  109. data/schemas/me.json +3 -3
  110. data/schemas/mePatch.json +2 -2
  111. data/schemas/multiDeviceCommand.json +1019 -0
  112. data/schemas/notebook.json +89 -0
  113. data/schemas/notebookPatch.json +89 -0
  114. data/schemas/notebookPost.json +89 -0
  115. data/schemas/notebooks.json +89 -0
  116. data/schemas/org.json +1 -1
  117. data/schemas/orgInviteInfo.json +3 -0
  118. data/schemas/orgInvitePost.json +3 -0
  119. data/schemas/orgInvites.json +3 -0
  120. data/schemas/orgPatch.json +1 -1
  121. data/schemas/orgs.json +1 -1
  122. data/schemas/passwordResetFinish.json +2 -2
  123. data/schemas/samlResponse.json +1 -1
  124. data/schemas/templateKeywords.json +14 -0
  125. data/schemas/timeSeriesData.json +101 -12
  126. data/schemas/timeSeriesQuery.json +101 -12
  127. data/schemas/userCredentials.json +14 -3
  128. data/schemas/userPost.json +22 -7
  129. metadata +20 -5
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "flowVersion": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "flowVersionId": {
11
+ "type": "string",
12
+ "pattern": "^[A-Fa-f\\d]{24}$"
13
+ },
14
+ "deviceId": {
15
+ "type": "string",
16
+ "pattern": "^[A-Fa-f\\d]{24}$"
17
+ },
18
+ "start": {
19
+ "type": "string",
20
+ "format": "date-time"
21
+ },
22
+ "end": {
23
+ "type": "string",
24
+ "format": "date-time"
25
+ },
26
+ "resolution": {
27
+ "type": "number"
28
+ },
29
+ "metrics": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "properties": {
34
+ "time": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ },
38
+ "pathsFailed": {
39
+ "type": "number"
40
+ },
41
+ "pathsCompleted": {
42
+ "type": "number"
43
+ },
44
+ "runCount": {
45
+ "type": "number"
46
+ },
47
+ "wallTime": {
48
+ "type": "number"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -62,7 +62,6 @@
62
62
  "deviceIdDisconnect",
63
63
  "deviceTagDisconnect",
64
64
  "integration",
65
- "mqttTopic",
66
65
  "notebook",
67
66
  "onBoot",
68
67
  "onConnect",
@@ -1008,6 +1007,109 @@
1008
1007
  ],
1009
1008
  "additionalProperties": false
1010
1009
  },
1010
+ {
1011
+ "type": "object",
1012
+ "properties": {
1013
+ "key": {
1014
+ "type": "string",
1015
+ "maxLength": 1024
1016
+ },
1017
+ "type": {
1018
+ "type": "string",
1019
+ "enum": [
1020
+ "mqttTopic"
1021
+ ]
1022
+ },
1023
+ "config": {
1024
+ "type": "object",
1025
+ "properties": {
1026
+ "integrationId": {
1027
+ "type": "string",
1028
+ "enum": [
1029
+ "losant",
1030
+ "local"
1031
+ ]
1032
+ }
1033
+ },
1034
+ "additionalProperties": false
1035
+ },
1036
+ "meta": {
1037
+ "type": "object",
1038
+ "properties": {
1039
+ "category": {
1040
+ "type": "string",
1041
+ "enum": [
1042
+ "trigger"
1043
+ ]
1044
+ },
1045
+ "name": {
1046
+ "type": "string",
1047
+ "enum": [
1048
+ "mqtt"
1049
+ ]
1050
+ },
1051
+ "label": {
1052
+ "type": "string",
1053
+ "minLength": 1,
1054
+ "maxLength": 255
1055
+ },
1056
+ "x": {
1057
+ "type": "number"
1058
+ },
1059
+ "y": {
1060
+ "type": "number"
1061
+ },
1062
+ "uiId": {
1063
+ "type": "string",
1064
+ "maxLength": 48
1065
+ },
1066
+ "description": {
1067
+ "type": "string",
1068
+ "maxLength": 32767
1069
+ },
1070
+ "icon": {
1071
+ "type": "string",
1072
+ "maxLength": 1024
1073
+ },
1074
+ "color": {
1075
+ "type": "string",
1076
+ "maxLength": 1024
1077
+ },
1078
+ "inputCount": {
1079
+ "type": "number"
1080
+ },
1081
+ "outputCount": {
1082
+ "type": "number"
1083
+ },
1084
+ "triggerId": {
1085
+ "type": "string",
1086
+ "maxLength": 48
1087
+ },
1088
+ "id": {
1089
+ "type": "string",
1090
+ "maxLength": 48
1091
+ }
1092
+ },
1093
+ "additionalProperties": false
1094
+ },
1095
+ "outputIds": {
1096
+ "type": "array",
1097
+ "items": {
1098
+ "type": "array",
1099
+ "items": {
1100
+ "type": "string",
1101
+ "maxLength": 255
1102
+ },
1103
+ "maxItems": 100
1104
+ },
1105
+ "maxItems": 100
1106
+ }
1107
+ },
1108
+ "required": [
1109
+ "type"
1110
+ ],
1111
+ "additionalProperties": false
1112
+ },
1011
1113
  {
1012
1114
  "type": "object",
1013
1115
  "properties": {
@@ -1294,6 +1396,19 @@
1294
1396
  "baudRate": {
1295
1397
  "type": "number"
1296
1398
  },
1399
+ "dataBits": {
1400
+ "type": "number"
1401
+ },
1402
+ "stopBits": {
1403
+ "type": "number"
1404
+ },
1405
+ "parity": {
1406
+ "type": "string",
1407
+ "maxLength": 8
1408
+ },
1409
+ "rtscts": {
1410
+ "type": "boolean"
1411
+ },
1297
1412
  "encoding": {
1298
1413
  "type": "string",
1299
1414
  "maxLength": 48
@@ -1302,6 +1417,10 @@
1302
1417
  "type": "string",
1303
1418
  "maxLength": 1024
1304
1419
  },
1420
+ "writeOnOpenEncoding": {
1421
+ "type": "string",
1422
+ "maxLength": 48
1423
+ },
1305
1424
  "byteLength": {
1306
1425
  "type": "string",
1307
1426
  "maxLength": 48
@@ -1309,6 +1428,10 @@
1309
1428
  "delimiter": {
1310
1429
  "type": "string",
1311
1430
  "maxLength": 48
1431
+ },
1432
+ "delimiterEncoding": {
1433
+ "type": "string",
1434
+ "maxLength": 48
1312
1435
  }
1313
1436
  },
1314
1437
  "additionalProperties": false
@@ -2126,7 +2249,6 @@
2126
2249
  "deviceIdDisconnect",
2127
2250
  "deviceTagDisconnect",
2128
2251
  "integration",
2129
- "mqttTopic",
2130
2252
  "notebook",
2131
2253
  "onBoot",
2132
2254
  "onConnect",
@@ -3072,6 +3194,109 @@
3072
3194
  ],
3073
3195
  "additionalProperties": false
3074
3196
  },
3197
+ {
3198
+ "type": "object",
3199
+ "properties": {
3200
+ "key": {
3201
+ "type": "string",
3202
+ "maxLength": 1024
3203
+ },
3204
+ "type": {
3205
+ "type": "string",
3206
+ "enum": [
3207
+ "mqttTopic"
3208
+ ]
3209
+ },
3210
+ "config": {
3211
+ "type": "object",
3212
+ "properties": {
3213
+ "integrationId": {
3214
+ "type": "string",
3215
+ "enum": [
3216
+ "losant",
3217
+ "local"
3218
+ ]
3219
+ }
3220
+ },
3221
+ "additionalProperties": false
3222
+ },
3223
+ "meta": {
3224
+ "type": "object",
3225
+ "properties": {
3226
+ "category": {
3227
+ "type": "string",
3228
+ "enum": [
3229
+ "trigger"
3230
+ ]
3231
+ },
3232
+ "name": {
3233
+ "type": "string",
3234
+ "enum": [
3235
+ "mqtt"
3236
+ ]
3237
+ },
3238
+ "label": {
3239
+ "type": "string",
3240
+ "minLength": 1,
3241
+ "maxLength": 255
3242
+ },
3243
+ "x": {
3244
+ "type": "number"
3245
+ },
3246
+ "y": {
3247
+ "type": "number"
3248
+ },
3249
+ "uiId": {
3250
+ "type": "string",
3251
+ "maxLength": 48
3252
+ },
3253
+ "description": {
3254
+ "type": "string",
3255
+ "maxLength": 32767
3256
+ },
3257
+ "icon": {
3258
+ "type": "string",
3259
+ "maxLength": 1024
3260
+ },
3261
+ "color": {
3262
+ "type": "string",
3263
+ "maxLength": 1024
3264
+ },
3265
+ "inputCount": {
3266
+ "type": "number"
3267
+ },
3268
+ "outputCount": {
3269
+ "type": "number"
3270
+ },
3271
+ "triggerId": {
3272
+ "type": "string",
3273
+ "maxLength": 48
3274
+ },
3275
+ "id": {
3276
+ "type": "string",
3277
+ "maxLength": 48
3278
+ }
3279
+ },
3280
+ "additionalProperties": false
3281
+ },
3282
+ "outputIds": {
3283
+ "type": "array",
3284
+ "items": {
3285
+ "type": "array",
3286
+ "items": {
3287
+ "type": "string",
3288
+ "maxLength": 255
3289
+ },
3290
+ "maxItems": 100
3291
+ },
3292
+ "maxItems": 100
3293
+ }
3294
+ },
3295
+ "required": [
3296
+ "type"
3297
+ ],
3298
+ "additionalProperties": false
3299
+ },
3075
3300
  {
3076
3301
  "type": "object",
3077
3302
  "properties": {
@@ -3358,6 +3583,19 @@
3358
3583
  "baudRate": {
3359
3584
  "type": "number"
3360
3585
  },
3586
+ "dataBits": {
3587
+ "type": "number"
3588
+ },
3589
+ "stopBits": {
3590
+ "type": "number"
3591
+ },
3592
+ "parity": {
3593
+ "type": "string",
3594
+ "maxLength": 8
3595
+ },
3596
+ "rtscts": {
3597
+ "type": "boolean"
3598
+ },
3361
3599
  "encoding": {
3362
3600
  "type": "string",
3363
3601
  "maxLength": 48
@@ -3366,6 +3604,10 @@
3366
3604
  "type": "string",
3367
3605
  "maxLength": 1024
3368
3606
  },
3607
+ "writeOnOpenEncoding": {
3608
+ "type": "string",
3609
+ "maxLength": 48
3610
+ },
3369
3611
  "byteLength": {
3370
3612
  "type": "string",
3371
3613
  "maxLength": 48
@@ -3373,6 +3615,10 @@
3373
3615
  "delimiter": {
3374
3616
  "type": "string",
3375
3617
  "maxLength": 48
3618
+ },
3619
+ "delimiterEncoding": {
3620
+ "type": "string",
3621
+ "maxLength": 48
3376
3622
  }
3377
3623
  },
3378
3624
  "additionalProperties": false
@@ -35,7 +35,6 @@
35
35
  "deviceIdDisconnect",
36
36
  "deviceTagDisconnect",
37
37
  "integration",
38
- "mqttTopic",
39
38
  "notebook",
40
39
  "onBoot",
41
40
  "onConnect",
@@ -981,6 +980,109 @@
981
980
  ],
982
981
  "additionalProperties": false
983
982
  },
983
+ {
984
+ "type": "object",
985
+ "properties": {
986
+ "key": {
987
+ "type": "string",
988
+ "maxLength": 1024
989
+ },
990
+ "type": {
991
+ "type": "string",
992
+ "enum": [
993
+ "mqttTopic"
994
+ ]
995
+ },
996
+ "config": {
997
+ "type": "object",
998
+ "properties": {
999
+ "integrationId": {
1000
+ "type": "string",
1001
+ "enum": [
1002
+ "losant",
1003
+ "local"
1004
+ ]
1005
+ }
1006
+ },
1007
+ "additionalProperties": false
1008
+ },
1009
+ "meta": {
1010
+ "type": "object",
1011
+ "properties": {
1012
+ "category": {
1013
+ "type": "string",
1014
+ "enum": [
1015
+ "trigger"
1016
+ ]
1017
+ },
1018
+ "name": {
1019
+ "type": "string",
1020
+ "enum": [
1021
+ "mqtt"
1022
+ ]
1023
+ },
1024
+ "label": {
1025
+ "type": "string",
1026
+ "minLength": 1,
1027
+ "maxLength": 255
1028
+ },
1029
+ "x": {
1030
+ "type": "number"
1031
+ },
1032
+ "y": {
1033
+ "type": "number"
1034
+ },
1035
+ "uiId": {
1036
+ "type": "string",
1037
+ "maxLength": 48
1038
+ },
1039
+ "description": {
1040
+ "type": "string",
1041
+ "maxLength": 32767
1042
+ },
1043
+ "icon": {
1044
+ "type": "string",
1045
+ "maxLength": 1024
1046
+ },
1047
+ "color": {
1048
+ "type": "string",
1049
+ "maxLength": 1024
1050
+ },
1051
+ "inputCount": {
1052
+ "type": "number"
1053
+ },
1054
+ "outputCount": {
1055
+ "type": "number"
1056
+ },
1057
+ "triggerId": {
1058
+ "type": "string",
1059
+ "maxLength": 48
1060
+ },
1061
+ "id": {
1062
+ "type": "string",
1063
+ "maxLength": 48
1064
+ }
1065
+ },
1066
+ "additionalProperties": false
1067
+ },
1068
+ "outputIds": {
1069
+ "type": "array",
1070
+ "items": {
1071
+ "type": "array",
1072
+ "items": {
1073
+ "type": "string",
1074
+ "maxLength": 255
1075
+ },
1076
+ "maxItems": 100
1077
+ },
1078
+ "maxItems": 100
1079
+ }
1080
+ },
1081
+ "required": [
1082
+ "type"
1083
+ ],
1084
+ "additionalProperties": false
1085
+ },
984
1086
  {
985
1087
  "type": "object",
986
1088
  "properties": {
@@ -1267,6 +1369,19 @@
1267
1369
  "baudRate": {
1268
1370
  "type": "number"
1269
1371
  },
1372
+ "dataBits": {
1373
+ "type": "number"
1374
+ },
1375
+ "stopBits": {
1376
+ "type": "number"
1377
+ },
1378
+ "parity": {
1379
+ "type": "string",
1380
+ "maxLength": 8
1381
+ },
1382
+ "rtscts": {
1383
+ "type": "boolean"
1384
+ },
1270
1385
  "encoding": {
1271
1386
  "type": "string",
1272
1387
  "maxLength": 48
@@ -1275,6 +1390,10 @@
1275
1390
  "type": "string",
1276
1391
  "maxLength": 1024
1277
1392
  },
1393
+ "writeOnOpenEncoding": {
1394
+ "type": "string",
1395
+ "maxLength": 48
1396
+ },
1278
1397
  "byteLength": {
1279
1398
  "type": "string",
1280
1399
  "maxLength": 48
@@ -1282,6 +1401,10 @@
1282
1401
  "delimiter": {
1283
1402
  "type": "string",
1284
1403
  "maxLength": 48
1404
+ },
1405
+ "delimiterEncoding": {
1406
+ "type": "string",
1407
+ "maxLength": 48
1285
1408
  }
1286
1409
  },
1287
1410
  "additionalProperties": false