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
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "oneOf": [
4
+ {
5
+ "type": "string",
6
+ "enum": [
7
+ "standalone",
8
+ "gateway",
9
+ "peripheral",
10
+ "floating",
11
+ "edgeCompute",
12
+ "system"
13
+ ]
14
+ },
15
+ {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string",
19
+ "enum": [
20
+ "standalone",
21
+ "gateway",
22
+ "peripheral",
23
+ "floating",
24
+ "edgeCompute",
25
+ "system"
26
+ ]
27
+ },
28
+ "additionalProperties": false
29
+ }
30
+ ]
31
+ }
@@ -51,6 +51,95 @@
51
51
  "gps",
52
52
  "boolean"
53
53
  ]
54
+ },
55
+ "description": {
56
+ "type": "string",
57
+ "maxLength": 32767
58
+ },
59
+ "attributeTags": {
60
+ "type": "object",
61
+ "patternProperties": {
62
+ "^[0-9a-zA-Z_-]{1,255}$": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 255
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ },
70
+ "system": {
71
+ "type": "object",
72
+ "properties": {
73
+ "aggregation": {
74
+ "type": "string",
75
+ "enum": [
76
+ "FIRST",
77
+ "LAST",
78
+ "COUNT",
79
+ "MAX",
80
+ "MIN",
81
+ "MEDIAN",
82
+ "MEAN",
83
+ "SUM",
84
+ "STD_DEV",
85
+ "NONE"
86
+ ]
87
+ },
88
+ "childAttributes": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "properties": {
93
+ "name": {
94
+ "type": "string",
95
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
96
+ },
97
+ "mode": {
98
+ "type": "string",
99
+ "enum": [
100
+ "all",
101
+ "whitelist",
102
+ "blacklist"
103
+ ]
104
+ },
105
+ "deviceIds": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "string",
109
+ "pattern": "^[A-Fa-f\\d]{24}$"
110
+ },
111
+ "maxItems": 1000
112
+ },
113
+ "deviceTags": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "key": {
119
+ "type": "string",
120
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
121
+ },
122
+ "value": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 255
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ "maxItems": 100
131
+ }
132
+ },
133
+ "required": [
134
+ "name",
135
+ "mode"
136
+ ],
137
+ "additionalProperties": false
138
+ },
139
+ "maxItems": 256
140
+ }
141
+ },
142
+ "additionalProperties": false
54
143
  }
55
144
  },
56
145
  "required": [
@@ -68,12 +157,32 @@
68
157
  "gateway",
69
158
  "peripheral",
70
159
  "floating",
71
- "edgeCompute"
160
+ "edgeCompute",
161
+ "system"
72
162
  ]
73
163
  },
74
164
  "gatewayId": {
75
165
  "type": "string",
76
166
  "pattern": "^[A-Fa-f\\d]{24}$"
167
+ },
168
+ "parentId": {
169
+ "oneOf": [
170
+ {
171
+ "type": "string",
172
+ "pattern": "^[A-Fa-f\\d]{24}$"
173
+ },
174
+ {
175
+ "type": "null"
176
+ }
177
+ ]
178
+ },
179
+ "systemInterval": {
180
+ "type": "integer",
181
+ "minimum": 5,
182
+ "maximum": 3600
183
+ },
184
+ "keepDuplicates": {
185
+ "type": "boolean"
77
186
  }
78
187
  },
79
188
  "additionalProperties": false
@@ -51,6 +51,95 @@
51
51
  "gps",
52
52
  "boolean"
53
53
  ]
54
+ },
55
+ "description": {
56
+ "type": "string",
57
+ "maxLength": 32767
58
+ },
59
+ "attributeTags": {
60
+ "type": "object",
61
+ "patternProperties": {
62
+ "^[0-9a-zA-Z_-]{1,255}$": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 255
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ },
70
+ "system": {
71
+ "type": "object",
72
+ "properties": {
73
+ "aggregation": {
74
+ "type": "string",
75
+ "enum": [
76
+ "FIRST",
77
+ "LAST",
78
+ "COUNT",
79
+ "MAX",
80
+ "MIN",
81
+ "MEDIAN",
82
+ "MEAN",
83
+ "SUM",
84
+ "STD_DEV",
85
+ "NONE"
86
+ ]
87
+ },
88
+ "childAttributes": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "properties": {
93
+ "name": {
94
+ "type": "string",
95
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
96
+ },
97
+ "mode": {
98
+ "type": "string",
99
+ "enum": [
100
+ "all",
101
+ "whitelist",
102
+ "blacklist"
103
+ ]
104
+ },
105
+ "deviceIds": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "string",
109
+ "pattern": "^[A-Fa-f\\d]{24}$"
110
+ },
111
+ "maxItems": 1000
112
+ },
113
+ "deviceTags": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "key": {
119
+ "type": "string",
120
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
121
+ },
122
+ "value": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 255
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ "maxItems": 100
131
+ }
132
+ },
133
+ "required": [
134
+ "name",
135
+ "mode"
136
+ ],
137
+ "additionalProperties": false
138
+ },
139
+ "maxItems": 256
140
+ }
141
+ },
142
+ "additionalProperties": false
54
143
  }
55
144
  },
56
145
  "required": [
@@ -68,12 +157,32 @@
68
157
  "gateway",
69
158
  "peripheral",
70
159
  "floating",
71
- "edgeCompute"
160
+ "edgeCompute",
161
+ "system"
72
162
  ]
73
163
  },
74
164
  "gatewayId": {
75
165
  "type": "string",
76
166
  "pattern": "^[A-Fa-f\\d]{24}$"
167
+ },
168
+ "parentId": {
169
+ "oneOf": [
170
+ {
171
+ "type": "string",
172
+ "pattern": "^[A-Fa-f\\d]{24}$"
173
+ },
174
+ {
175
+ "type": "null"
176
+ }
177
+ ]
178
+ },
179
+ "systemInterval": {
180
+ "type": "integer",
181
+ "minimum": 5,
182
+ "maximum": 3600
183
+ },
184
+ "keepDuplicates": {
185
+ "type": "boolean"
77
186
  }
78
187
  },
79
188
  "additionalProperties": false,
@@ -80,6 +80,95 @@
80
80
  "gps",
81
81
  "boolean"
82
82
  ]
83
+ },
84
+ "description": {
85
+ "type": "string",
86
+ "maxLength": 32767
87
+ },
88
+ "attributeTags": {
89
+ "type": "object",
90
+ "patternProperties": {
91
+ "^[0-9a-zA-Z_-]{1,255}$": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 255
95
+ }
96
+ },
97
+ "additionalProperties": false
98
+ },
99
+ "system": {
100
+ "type": "object",
101
+ "properties": {
102
+ "aggregation": {
103
+ "type": "string",
104
+ "enum": [
105
+ "FIRST",
106
+ "LAST",
107
+ "COUNT",
108
+ "MAX",
109
+ "MIN",
110
+ "MEDIAN",
111
+ "MEAN",
112
+ "SUM",
113
+ "STD_DEV",
114
+ "NONE"
115
+ ]
116
+ },
117
+ "childAttributes": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "object",
121
+ "properties": {
122
+ "name": {
123
+ "type": "string",
124
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
125
+ },
126
+ "mode": {
127
+ "type": "string",
128
+ "enum": [
129
+ "all",
130
+ "whitelist",
131
+ "blacklist"
132
+ ]
133
+ },
134
+ "deviceIds": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string",
138
+ "pattern": "^[A-Fa-f\\d]{24}$"
139
+ },
140
+ "maxItems": 1000
141
+ },
142
+ "deviceTags": {
143
+ "type": "array",
144
+ "items": {
145
+ "type": "object",
146
+ "properties": {
147
+ "key": {
148
+ "type": "string",
149
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
150
+ },
151
+ "value": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 255
155
+ }
156
+ },
157
+ "additionalProperties": false
158
+ },
159
+ "maxItems": 100
160
+ }
161
+ },
162
+ "required": [
163
+ "name",
164
+ "mode"
165
+ ],
166
+ "additionalProperties": false
167
+ },
168
+ "maxItems": 256
169
+ }
170
+ },
171
+ "additionalProperties": false
83
172
  }
84
173
  },
85
174
  "required": [
@@ -97,12 +186,32 @@
97
186
  "gateway",
98
187
  "peripheral",
99
188
  "floating",
100
- "edgeCompute"
189
+ "edgeCompute",
190
+ "system"
101
191
  ]
102
192
  },
103
193
  "gatewayId": {
104
194
  "type": "string",
105
195
  "pattern": "^[A-Fa-f\\d]{24}$"
196
+ },
197
+ "parentId": {
198
+ "oneOf": [
199
+ {
200
+ "type": "string",
201
+ "pattern": "^[A-Fa-f\\d]{24}$"
202
+ },
203
+ {
204
+ "type": "null"
205
+ }
206
+ ]
207
+ },
208
+ "systemInterval": {
209
+ "type": "integer",
210
+ "minimum": 5,
211
+ "maximum": 3600
212
+ },
213
+ "keepDuplicates": {
214
+ "type": "boolean"
106
215
  }
107
216
  }
108
217
  }
@@ -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