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
@@ -53,7 +53,7 @@
53
53
  "properties": {
54
54
  "domainName": {
55
55
  "type": "string",
56
- "maxLength": 1024,
56
+ "maxLength": 45,
57
57
  "minLength": 3
58
58
  },
59
59
  "id": {
@@ -60,7 +60,7 @@
60
60
  "properties": {
61
61
  "domainName": {
62
62
  "type": "string",
63
- "maxLength": 1024,
63
+ "maxLength": 45,
64
64
  "minLength": 3
65
65
  },
66
66
  "id": {
@@ -77,7 +77,6 @@
77
77
  "deviceIdDisconnect",
78
78
  "deviceTagDisconnect",
79
79
  "integration",
80
- "mqttTopic",
81
80
  "notebook",
82
81
  "onBoot",
83
82
  "onConnect",
@@ -1023,6 +1022,109 @@
1023
1022
  ],
1024
1023
  "additionalProperties": false
1025
1024
  },
1025
+ {
1026
+ "type": "object",
1027
+ "properties": {
1028
+ "key": {
1029
+ "type": "string",
1030
+ "maxLength": 1024
1031
+ },
1032
+ "type": {
1033
+ "type": "string",
1034
+ "enum": [
1035
+ "mqttTopic"
1036
+ ]
1037
+ },
1038
+ "config": {
1039
+ "type": "object",
1040
+ "properties": {
1041
+ "integrationId": {
1042
+ "type": "string",
1043
+ "enum": [
1044
+ "losant",
1045
+ "local"
1046
+ ]
1047
+ }
1048
+ },
1049
+ "additionalProperties": false
1050
+ },
1051
+ "meta": {
1052
+ "type": "object",
1053
+ "properties": {
1054
+ "category": {
1055
+ "type": "string",
1056
+ "enum": [
1057
+ "trigger"
1058
+ ]
1059
+ },
1060
+ "name": {
1061
+ "type": "string",
1062
+ "enum": [
1063
+ "mqtt"
1064
+ ]
1065
+ },
1066
+ "label": {
1067
+ "type": "string",
1068
+ "minLength": 1,
1069
+ "maxLength": 255
1070
+ },
1071
+ "x": {
1072
+ "type": "number"
1073
+ },
1074
+ "y": {
1075
+ "type": "number"
1076
+ },
1077
+ "uiId": {
1078
+ "type": "string",
1079
+ "maxLength": 48
1080
+ },
1081
+ "description": {
1082
+ "type": "string",
1083
+ "maxLength": 32767
1084
+ },
1085
+ "icon": {
1086
+ "type": "string",
1087
+ "maxLength": 1024
1088
+ },
1089
+ "color": {
1090
+ "type": "string",
1091
+ "maxLength": 1024
1092
+ },
1093
+ "inputCount": {
1094
+ "type": "number"
1095
+ },
1096
+ "outputCount": {
1097
+ "type": "number"
1098
+ },
1099
+ "triggerId": {
1100
+ "type": "string",
1101
+ "maxLength": 48
1102
+ },
1103
+ "id": {
1104
+ "type": "string",
1105
+ "maxLength": 48
1106
+ }
1107
+ },
1108
+ "additionalProperties": false
1109
+ },
1110
+ "outputIds": {
1111
+ "type": "array",
1112
+ "items": {
1113
+ "type": "array",
1114
+ "items": {
1115
+ "type": "string",
1116
+ "maxLength": 255
1117
+ },
1118
+ "maxItems": 100
1119
+ },
1120
+ "maxItems": 100
1121
+ }
1122
+ },
1123
+ "required": [
1124
+ "type"
1125
+ ],
1126
+ "additionalProperties": false
1127
+ },
1026
1128
  {
1027
1129
  "type": "object",
1028
1130
  "properties": {
@@ -1309,6 +1411,19 @@
1309
1411
  "baudRate": {
1310
1412
  "type": "number"
1311
1413
  },
1414
+ "dataBits": {
1415
+ "type": "number"
1416
+ },
1417
+ "stopBits": {
1418
+ "type": "number"
1419
+ },
1420
+ "parity": {
1421
+ "type": "string",
1422
+ "maxLength": 8
1423
+ },
1424
+ "rtscts": {
1425
+ "type": "boolean"
1426
+ },
1312
1427
  "encoding": {
1313
1428
  "type": "string",
1314
1429
  "maxLength": 48
@@ -1317,6 +1432,10 @@
1317
1432
  "type": "string",
1318
1433
  "maxLength": 1024
1319
1434
  },
1435
+ "writeOnOpenEncoding": {
1436
+ "type": "string",
1437
+ "maxLength": 48
1438
+ },
1320
1439
  "byteLength": {
1321
1440
  "type": "string",
1322
1441
  "maxLength": 48
@@ -1324,6 +1443,10 @@
1324
1443
  "delimiter": {
1325
1444
  "type": "string",
1326
1445
  "maxLength": 48
1446
+ },
1447
+ "delimiterEncoding": {
1448
+ "type": "string",
1449
+ "maxLength": 48
1327
1450
  }
1328
1451
  },
1329
1452
  "additionalProperties": false
@@ -0,0 +1,87 @@
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
+ "limit": {
27
+ "type": "number"
28
+ },
29
+ "sortDirection": {
30
+ "type": "string",
31
+ "enum": [
32
+ "asc",
33
+ "desc",
34
+ "ASC",
35
+ "DESC",
36
+ ""
37
+ ]
38
+ },
39
+ "errors": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "time": {
45
+ "type": "string",
46
+ "format": "date-time"
47
+ },
48
+ "deviceId": {
49
+ "type": "string",
50
+ "pattern": "^[A-Fa-f\\d]{24}$"
51
+ },
52
+ "deviceName": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 255
56
+ },
57
+ "flowVersion": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 255
61
+ },
62
+ "flowVersionId": {
63
+ "type": "string",
64
+ "pattern": "^[A-Fa-f\\d]{24}$"
65
+ },
66
+ "nodeId": {
67
+ "type": "string"
68
+ },
69
+ "nodeLabel": {
70
+ "type": "string"
71
+ },
72
+ "error": {
73
+ "type": "object",
74
+ "properties": {
75
+ "name": {
76
+ "type": "string"
77
+ },
78
+ "message": {
79
+ "type": "string"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -58,7 +58,6 @@
58
58
  "deviceIdDisconnect",
59
59
  "deviceTagDisconnect",
60
60
  "integration",
61
- "mqttTopic",
62
61
  "notebook",
63
62
  "onBoot",
64
63
  "onConnect",
@@ -1004,6 +1003,109 @@
1004
1003
  ],
1005
1004
  "additionalProperties": false
1006
1005
  },
1006
+ {
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "key": {
1010
+ "type": "string",
1011
+ "maxLength": 1024
1012
+ },
1013
+ "type": {
1014
+ "type": "string",
1015
+ "enum": [
1016
+ "mqttTopic"
1017
+ ]
1018
+ },
1019
+ "config": {
1020
+ "type": "object",
1021
+ "properties": {
1022
+ "integrationId": {
1023
+ "type": "string",
1024
+ "enum": [
1025
+ "losant",
1026
+ "local"
1027
+ ]
1028
+ }
1029
+ },
1030
+ "additionalProperties": false
1031
+ },
1032
+ "meta": {
1033
+ "type": "object",
1034
+ "properties": {
1035
+ "category": {
1036
+ "type": "string",
1037
+ "enum": [
1038
+ "trigger"
1039
+ ]
1040
+ },
1041
+ "name": {
1042
+ "type": "string",
1043
+ "enum": [
1044
+ "mqtt"
1045
+ ]
1046
+ },
1047
+ "label": {
1048
+ "type": "string",
1049
+ "minLength": 1,
1050
+ "maxLength": 255
1051
+ },
1052
+ "x": {
1053
+ "type": "number"
1054
+ },
1055
+ "y": {
1056
+ "type": "number"
1057
+ },
1058
+ "uiId": {
1059
+ "type": "string",
1060
+ "maxLength": 48
1061
+ },
1062
+ "description": {
1063
+ "type": "string",
1064
+ "maxLength": 32767
1065
+ },
1066
+ "icon": {
1067
+ "type": "string",
1068
+ "maxLength": 1024
1069
+ },
1070
+ "color": {
1071
+ "type": "string",
1072
+ "maxLength": 1024
1073
+ },
1074
+ "inputCount": {
1075
+ "type": "number"
1076
+ },
1077
+ "outputCount": {
1078
+ "type": "number"
1079
+ },
1080
+ "triggerId": {
1081
+ "type": "string",
1082
+ "maxLength": 48
1083
+ },
1084
+ "id": {
1085
+ "type": "string",
1086
+ "maxLength": 48
1087
+ }
1088
+ },
1089
+ "additionalProperties": false
1090
+ },
1091
+ "outputIds": {
1092
+ "type": "array",
1093
+ "items": {
1094
+ "type": "array",
1095
+ "items": {
1096
+ "type": "string",
1097
+ "maxLength": 255
1098
+ },
1099
+ "maxItems": 100
1100
+ },
1101
+ "maxItems": 100
1102
+ }
1103
+ },
1104
+ "required": [
1105
+ "type"
1106
+ ],
1107
+ "additionalProperties": false
1108
+ },
1007
1109
  {
1008
1110
  "type": "object",
1009
1111
  "properties": {
@@ -1290,6 +1392,19 @@
1290
1392
  "baudRate": {
1291
1393
  "type": "number"
1292
1394
  },
1395
+ "dataBits": {
1396
+ "type": "number"
1397
+ },
1398
+ "stopBits": {
1399
+ "type": "number"
1400
+ },
1401
+ "parity": {
1402
+ "type": "string",
1403
+ "maxLength": 8
1404
+ },
1405
+ "rtscts": {
1406
+ "type": "boolean"
1407
+ },
1293
1408
  "encoding": {
1294
1409
  "type": "string",
1295
1410
  "maxLength": 48
@@ -1298,6 +1413,10 @@
1298
1413
  "type": "string",
1299
1414
  "maxLength": 1024
1300
1415
  },
1416
+ "writeOnOpenEncoding": {
1417
+ "type": "string",
1418
+ "maxLength": 48
1419
+ },
1301
1420
  "byteLength": {
1302
1421
  "type": "string",
1303
1422
  "maxLength": 48
@@ -1305,6 +1424,10 @@
1305
1424
  "delimiter": {
1306
1425
  "type": "string",
1307
1426
  "maxLength": 48
1427
+ },
1428
+ "delimiterEncoding": {
1429
+ "type": "string",
1430
+ "maxLength": 48
1308
1431
  }
1309
1432
  },
1310
1433
  "additionalProperties": false
@@ -47,7 +47,6 @@
47
47
  "deviceIdDisconnect",
48
48
  "deviceTagDisconnect",
49
49
  "integration",
50
- "mqttTopic",
51
50
  "notebook",
52
51
  "onBoot",
53
52
  "onConnect",
@@ -993,6 +992,109 @@
993
992
  ],
994
993
  "additionalProperties": false
995
994
  },
995
+ {
996
+ "type": "object",
997
+ "properties": {
998
+ "key": {
999
+ "type": "string",
1000
+ "maxLength": 1024
1001
+ },
1002
+ "type": {
1003
+ "type": "string",
1004
+ "enum": [
1005
+ "mqttTopic"
1006
+ ]
1007
+ },
1008
+ "config": {
1009
+ "type": "object",
1010
+ "properties": {
1011
+ "integrationId": {
1012
+ "type": "string",
1013
+ "enum": [
1014
+ "losant",
1015
+ "local"
1016
+ ]
1017
+ }
1018
+ },
1019
+ "additionalProperties": false
1020
+ },
1021
+ "meta": {
1022
+ "type": "object",
1023
+ "properties": {
1024
+ "category": {
1025
+ "type": "string",
1026
+ "enum": [
1027
+ "trigger"
1028
+ ]
1029
+ },
1030
+ "name": {
1031
+ "type": "string",
1032
+ "enum": [
1033
+ "mqtt"
1034
+ ]
1035
+ },
1036
+ "label": {
1037
+ "type": "string",
1038
+ "minLength": 1,
1039
+ "maxLength": 255
1040
+ },
1041
+ "x": {
1042
+ "type": "number"
1043
+ },
1044
+ "y": {
1045
+ "type": "number"
1046
+ },
1047
+ "uiId": {
1048
+ "type": "string",
1049
+ "maxLength": 48
1050
+ },
1051
+ "description": {
1052
+ "type": "string",
1053
+ "maxLength": 32767
1054
+ },
1055
+ "icon": {
1056
+ "type": "string",
1057
+ "maxLength": 1024
1058
+ },
1059
+ "color": {
1060
+ "type": "string",
1061
+ "maxLength": 1024
1062
+ },
1063
+ "inputCount": {
1064
+ "type": "number"
1065
+ },
1066
+ "outputCount": {
1067
+ "type": "number"
1068
+ },
1069
+ "triggerId": {
1070
+ "type": "string",
1071
+ "maxLength": 48
1072
+ },
1073
+ "id": {
1074
+ "type": "string",
1075
+ "maxLength": 48
1076
+ }
1077
+ },
1078
+ "additionalProperties": false
1079
+ },
1080
+ "outputIds": {
1081
+ "type": "array",
1082
+ "items": {
1083
+ "type": "array",
1084
+ "items": {
1085
+ "type": "string",
1086
+ "maxLength": 255
1087
+ },
1088
+ "maxItems": 100
1089
+ },
1090
+ "maxItems": 100
1091
+ }
1092
+ },
1093
+ "required": [
1094
+ "type"
1095
+ ],
1096
+ "additionalProperties": false
1097
+ },
996
1098
  {
997
1099
  "type": "object",
998
1100
  "properties": {
@@ -1279,6 +1381,19 @@
1279
1381
  "baudRate": {
1280
1382
  "type": "number"
1281
1383
  },
1384
+ "dataBits": {
1385
+ "type": "number"
1386
+ },
1387
+ "stopBits": {
1388
+ "type": "number"
1389
+ },
1390
+ "parity": {
1391
+ "type": "string",
1392
+ "maxLength": 8
1393
+ },
1394
+ "rtscts": {
1395
+ "type": "boolean"
1396
+ },
1282
1397
  "encoding": {
1283
1398
  "type": "string",
1284
1399
  "maxLength": 48
@@ -1287,6 +1402,10 @@
1287
1402
  "type": "string",
1288
1403
  "maxLength": 1024
1289
1404
  },
1405
+ "writeOnOpenEncoding": {
1406
+ "type": "string",
1407
+ "maxLength": 48
1408
+ },
1290
1409
  "byteLength": {
1291
1410
  "type": "string",
1292
1411
  "maxLength": 48
@@ -1294,6 +1413,10 @@
1294
1413
  "delimiter": {
1295
1414
  "type": "string",
1296
1415
  "maxLength": 48
1416
+ },
1417
+ "delimiterEncoding": {
1418
+ "type": "string",
1419
+ "maxLength": 48
1297
1420
  }
1298
1421
  },
1299
1422
  "additionalProperties": false