losant_rest 1.9.2 → 1.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +38445 -24043
  3. data/docs/application.md +124 -2
  4. data/docs/applicationTemplates.md +50 -0
  5. data/docs/auth.md +72 -0
  6. data/docs/device.md +1 -0
  7. data/docs/devices.md +92 -3
  8. data/docs/experienceEndpoints.md +1 -0
  9. data/docs/file.md +4 -4
  10. data/docs/flow.md +94 -1
  11. data/docs/flowVersion.md +96 -1
  12. data/lib/losant_rest.rb +1 -0
  13. data/lib/losant_rest/application.rb +93 -2
  14. data/lib/losant_rest/application_templates.rb +88 -0
  15. data/lib/losant_rest/auth.rb +84 -0
  16. data/lib/losant_rest/client.rb +6 -2
  17. data/lib/losant_rest/device.rb +2 -0
  18. data/lib/losant_rest/devices.rb +105 -2
  19. data/lib/losant_rest/experience_endpoints.rb +2 -0
  20. data/lib/losant_rest/file.rb +3 -3
  21. data/lib/losant_rest/flow.rb +115 -1
  22. data/lib/losant_rest/flow_version.rb +115 -1
  23. data/lib/losant_rest/version.rb +2 -2
  24. data/schemas/advancedDeviceQuery.json +1018 -0
  25. data/schemas/advancedEventQuery.json +382 -13
  26. data/schemas/advancedQuery.json +37 -3
  27. data/schemas/application.json +7 -2
  28. data/schemas/applicationApiTokenPost.json +8 -1
  29. data/schemas/applicationCreationByTemplateResult.json +7 -2
  30. data/schemas/applicationPatch.json +7 -2
  31. data/schemas/applicationPost.json +11 -2
  32. data/schemas/applicationReadme.json +29 -0
  33. data/schemas/applicationReadmePatch.json +11 -0
  34. data/schemas/applicationTemplate.json +99 -0
  35. data/schemas/applicationTemplates.json +140 -0
  36. data/schemas/applications.json +7 -2
  37. data/schemas/dashboard.json +1168 -144
  38. data/schemas/dashboardPatch.json +1168 -144
  39. data/schemas/dashboardPost.json +1168 -144
  40. data/schemas/dashboards.json +1168 -144
  41. data/schemas/dataExport.json +11 -0
  42. data/schemas/dataTableRows.json +3 -0
  43. data/schemas/dataTableRowsExport.json +37 -3
  44. data/schemas/device.json +16 -3
  45. data/schemas/devicePatch.json +16 -3
  46. data/schemas/devicePost.json +16 -3
  47. data/schemas/deviceRecipe.json +16 -3
  48. data/schemas/deviceRecipePatch.json +16 -3
  49. data/schemas/deviceRecipePost.json +16 -3
  50. data/schemas/deviceRecipes.json +16 -3
  51. data/schemas/devices.json +19 -3
  52. data/schemas/devicesDataRemoved.json +12 -0
  53. data/schemas/devicesDeletePost.json +1034 -0
  54. data/schemas/devicesDeleted.json +12 -0
  55. data/schemas/devicesExportPost.json +1035 -0
  56. data/schemas/devicesPatch.json +1773 -7
  57. data/schemas/devicesRemoveDataPost.json +1056 -0
  58. data/schemas/devicesUpdated.json +18 -0
  59. data/schemas/eventPost.json +22 -0
  60. data/schemas/events.json +1 -816
  61. data/schemas/eventsExport.json +382 -13
  62. data/schemas/experienceDomain.json +1 -1
  63. data/schemas/experienceDomainPatch.json +1 -1
  64. data/schemas/experienceDomainPost.json +1 -1
  65. data/schemas/experienceDomains.json +1 -1
  66. data/schemas/experienceGroup.json +7 -0
  67. data/schemas/experienceGroupPatch.json +7 -0
  68. data/schemas/experienceGroupPost.json +7 -0
  69. data/schemas/experienceGroups.json +7 -0
  70. data/schemas/experienceLinkedResources.json +309 -3
  71. data/schemas/experienceVersion.json +1 -1
  72. data/schemas/experienceVersions.json +1 -1
  73. data/schemas/flow.json +103 -1
  74. data/schemas/flowErrors.json +87 -0
  75. data/schemas/flowPatch.json +103 -1
  76. data/schemas/flowPost.json +103 -1
  77. data/schemas/flowStats.json +54 -0
  78. data/schemas/flowVersion.json +206 -2
  79. data/schemas/flowVersionPost.json +103 -1
  80. data/schemas/flowVersions.json +206 -2
  81. data/schemas/flows.json +103 -1
  82. data/schemas/flowsImportPost.json +206 -2
  83. data/schemas/flowsImportResult.json +309 -3
  84. data/schemas/githubLogin.json +10 -1
  85. data/schemas/me.json +3 -0
  86. data/schemas/multiDeviceCommand.json +1019 -0
  87. data/schemas/notebook.json +99 -2
  88. data/schemas/notebookPatch.json +99 -2
  89. data/schemas/notebookPost.json +99 -2
  90. data/schemas/notebooks.json +99 -2
  91. data/schemas/org.json +8 -0
  92. data/schemas/orgPatch.json +9 -0
  93. data/schemas/orgs.json +8 -0
  94. data/schemas/samlResponse.json +21 -0
  95. data/schemas/ssoRequest.json +20 -0
  96. data/schemas/timeSeriesData.json +91 -12
  97. data/schemas/timeSeriesQuery.json +21 -12
  98. data/schemas/userCredentials.json +10 -1
  99. data/schemas/userPost.json +10 -1
  100. metadata +20 -4
@@ -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": {
@@ -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": {
@@ -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": {