losant_rest 1.10.2 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/_schemas.md +21561 -8561
  4. data/docs/application.md +83 -0
  5. data/docs/applicationApiTokens.md +2 -2
  6. data/docs/applicationCertificateAuthorities.md +1 -1
  7. data/docs/applicationCertificates.md +1 -1
  8. data/docs/applicationDashboard.md +133 -0
  9. data/docs/applicationDashboards.md +93 -0
  10. data/docs/applicationKeys.md +4 -3
  11. data/docs/applicationTemplate.md +46 -0
  12. data/docs/applicationTemplates.md +77 -2
  13. data/docs/applications.md +1 -1
  14. data/docs/auditLogs.md +1 -1
  15. data/docs/dashboards.md +1 -1
  16. data/docs/dataTables.md +1 -1
  17. data/docs/device.md +6 -3
  18. data/docs/deviceRecipes.md +1 -1
  19. data/docs/devices.md +130 -4
  20. data/docs/edgeDeployments.md +1 -1
  21. data/docs/events.md +1 -1
  22. data/docs/experienceEndpoint.md +1 -0
  23. data/docs/experienceEndpoints.md +1 -0
  24. data/docs/experienceGroups.md +1 -1
  25. data/docs/experienceUsers.md +1 -1
  26. data/docs/experienceVersions.md +1 -1
  27. data/docs/experienceViews.md +1 -1
  28. data/docs/file.md +4 -4
  29. data/docs/files.md +1 -1
  30. data/docs/flow.md +94 -1
  31. data/docs/flowVersion.md +96 -1
  32. data/docs/flowVersions.md +2 -1
  33. data/docs/flows.md +5 -2
  34. data/docs/integration.md +1 -0
  35. data/docs/integrations.md +1 -1
  36. data/docs/me.md +0 -36
  37. data/docs/notebooks.md +1 -1
  38. data/docs/orgs.md +1 -1
  39. data/docs/webhook.md +1 -0
  40. data/docs/webhooks.md +1 -1
  41. data/lib/losant_rest.rb +3 -0
  42. data/lib/losant_rest/application.rb +95 -0
  43. data/lib/losant_rest/application_api_tokens.rb +1 -1
  44. data/lib/losant_rest/application_dashboard.rb +176 -0
  45. data/lib/losant_rest/application_dashboards.rb +138 -0
  46. data/lib/losant_rest/application_keys.rb +3 -0
  47. data/lib/losant_rest/application_template.rb +79 -0
  48. data/lib/losant_rest/application_templates.rb +89 -1
  49. data/lib/losant_rest/client.rb +14 -2
  50. data/lib/losant_rest/device.rb +9 -3
  51. data/lib/losant_rest/devices.rb +154 -1
  52. data/lib/losant_rest/experience_endpoint.rb +2 -0
  53. data/lib/losant_rest/experience_endpoints.rb +2 -0
  54. data/lib/losant_rest/file.rb +3 -3
  55. data/lib/losant_rest/flow.rb +115 -1
  56. data/lib/losant_rest/flow_version.rb +115 -1
  57. data/lib/losant_rest/flow_versions.rb +3 -0
  58. data/lib/losant_rest/flows.rb +8 -0
  59. data/lib/losant_rest/integration.rb +2 -0
  60. data/lib/losant_rest/me.rb +0 -41
  61. data/lib/losant_rest/version.rb +1 -1
  62. data/lib/losant_rest/webhook.rb +2 -0
  63. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  64. data/schemas/advancedFlowByVersionQuery.json +665 -0
  65. data/schemas/advancedFlowQuery.json +883 -0
  66. data/schemas/advancedFlowVersionQuery.json +925 -0
  67. data/schemas/application.json +8 -0
  68. data/schemas/applicationApiTokenPost.json +16 -1
  69. data/schemas/applicationApplyTemplatePatch.json +19 -0
  70. data/schemas/applicationCreationByTemplateResult.json +8 -0
  71. data/schemas/applicationDashboardPost.json +5665 -0
  72. data/schemas/applicationGlobalPatch.json +33 -0
  73. data/schemas/applicationPost.json +8 -0
  74. data/schemas/applicationTemplate.json +20 -0
  75. data/schemas/applicationTemplateCategories.json +43 -0
  76. data/schemas/applicationTemplateCategory.json +23 -0
  77. data/schemas/applicationTemplates.json +32 -0
  78. data/schemas/applications.json +8 -0
  79. data/schemas/attributeNamesResponse.json +14 -0
  80. data/schemas/authedUser.json +3 -0
  81. data/schemas/changePassword.json +2 -2
  82. data/schemas/dashboard.json +195 -26
  83. data/schemas/dashboardPatch.json +195 -26
  84. data/schemas/dashboardPost.json +195 -26
  85. data/schemas/dashboards.json +195 -26
  86. data/schemas/dataExport.json +132 -1
  87. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  88. data/schemas/deviceClassFilter.json +1 -2
  89. data/schemas/eventPost.json +22 -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 +96 -0
  95. data/schemas/experienceVersion.json +10 -1
  96. data/schemas/experienceVersionPatch.json +9 -0
  97. data/schemas/experienceVersions.json +10 -1
  98. data/schemas/files.json +3 -0
  99. data/schemas/flow.json +32 -0
  100. data/schemas/flowErrors.json +87 -0
  101. data/schemas/flowPatch.json +32 -0
  102. data/schemas/flowPost.json +32 -0
  103. data/schemas/flowStats.json +54 -0
  104. data/schemas/flowVersion.json +64 -0
  105. data/schemas/flowVersionPost.json +32 -0
  106. data/schemas/flowVersions.json +64 -0
  107. data/schemas/flows.json +32 -0
  108. data/schemas/flowsImportPost.json +64 -0
  109. data/schemas/flowsImportResult.json +96 -0
  110. data/schemas/githubLogin.json +33 -4
  111. data/schemas/instance.json +132 -0
  112. data/schemas/instanceOrg.json +119 -0
  113. data/schemas/instanceOrgPatch.json +103 -0
  114. data/schemas/instanceOrgPost.json +114 -0
  115. data/schemas/instanceOrgs.json +160 -0
  116. data/schemas/instances.json +43 -0
  117. data/schemas/integration.json +3 -0
  118. data/schemas/integrationPatch.json +3 -0
  119. data/schemas/integrationPost.json +3 -0
  120. data/schemas/integrations.json +3 -0
  121. data/schemas/me.json +3 -3
  122. data/schemas/mePatch.json +2 -2
  123. data/schemas/notebook.json +96 -0
  124. data/schemas/notebookExecutionLogs.json +7 -0
  125. data/schemas/notebookPatch.json +96 -0
  126. data/schemas/notebookPost.json +96 -0
  127. data/schemas/notebooks.json +96 -0
  128. data/schemas/org.json +1 -1
  129. data/schemas/orgInviteInfo.json +3 -0
  130. data/schemas/orgInvitePost.json +3 -0
  131. data/schemas/orgInvites.json +3 -0
  132. data/schemas/orgPatch.json +1 -1
  133. data/schemas/orgs.json +1 -1
  134. data/schemas/passwordResetFinish.json +2 -2
  135. data/schemas/samlResponse.json +1 -1
  136. data/schemas/tagKeysResponse.json +14 -0
  137. data/schemas/tagValuesResponse.json +19 -0
  138. data/schemas/templateKeywords.json +14 -0
  139. data/schemas/timeSeriesData.json +12 -2
  140. data/schemas/timeSeriesQuery.json +94 -14
  141. data/schemas/userCredentials.json +31 -3
  142. data/schemas/userPost.json +39 -7
  143. metadata +34 -6
@@ -11,6 +11,13 @@
11
11
  "type": "string",
12
12
  "maxLength": 32767
13
13
  },
14
+ "imageVersion": {
15
+ "type": "string",
16
+ "enum": [
17
+ "v1",
18
+ "v2"
19
+ ]
20
+ },
14
21
  "inputs": {
15
22
  "type": "array",
16
23
  "items": {
@@ -113,6 +120,95 @@
113
120
  ],
114
121
  "additionalProperties": false
115
122
  },
123
+ {
124
+ "type": "object",
125
+ "properties": {
126
+ "inputType": {
127
+ "type": "string",
128
+ "enum": [
129
+ "deviceConnectionHistory"
130
+ ]
131
+ },
132
+ "fileName": {
133
+ "oneOf": [
134
+ {
135
+ "type": "string",
136
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
137
+ },
138
+ {
139
+ "type": "string",
140
+ "minLength": 4,
141
+ "maxLength": 255,
142
+ "pattern": ".*{{.+}}.*"
143
+ }
144
+ ]
145
+ },
146
+ "deviceTags": {
147
+ "type": "array",
148
+ "maxItems": 100,
149
+ "items": {
150
+ "type": "object",
151
+ "properties": {
152
+ "key": {
153
+ "oneOf": [
154
+ {
155
+ "type": "string",
156
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
157
+ },
158
+ {
159
+ "type": "string",
160
+ "minLength": 4,
161
+ "maxLength": 255,
162
+ "pattern": ".*{{.+}}.*"
163
+ }
164
+ ]
165
+ },
166
+ "value": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 255
170
+ }
171
+ },
172
+ "additionalProperties": false
173
+ }
174
+ },
175
+ "deviceIds": {
176
+ "type": "array",
177
+ "maxItems": 100,
178
+ "items": {
179
+ "oneOf": [
180
+ {
181
+ "type": "string",
182
+ "pattern": "^[A-Fa-f\\d]{24}$"
183
+ },
184
+ {
185
+ "type": "string",
186
+ "minLength": 4,
187
+ "maxLength": 255,
188
+ "pattern": ".*{{.+}}.*"
189
+ }
190
+ ]
191
+ }
192
+ },
193
+ "queryJson": {
194
+ "type": "string",
195
+ "maxLength": 8192
196
+ },
197
+ "start": {
198
+ "type": "number"
199
+ },
200
+ "end": {
201
+ "type": "number"
202
+ }
203
+ },
204
+ "required": [
205
+ "inputType",
206
+ "fileName",
207
+ "start",
208
+ "end"
209
+ ],
210
+ "additionalProperties": false
211
+ },
116
212
  {
117
213
  "type": "object",
118
214
  "properties": {
@@ -46,6 +46,13 @@
46
46
  "jupyterFileUrl": {
47
47
  "type": "string"
48
48
  },
49
+ "imageVersion": {
50
+ "type": "string",
51
+ "enum": [
52
+ "v1",
53
+ "v2"
54
+ ]
55
+ },
49
56
  "inputs": {
50
57
  "type": "array",
51
58
  "items": {
@@ -148,6 +155,95 @@
148
155
  ],
149
156
  "additionalProperties": false
150
157
  },
158
+ {
159
+ "type": "object",
160
+ "properties": {
161
+ "inputType": {
162
+ "type": "string",
163
+ "enum": [
164
+ "deviceConnectionHistory"
165
+ ]
166
+ },
167
+ "fileName": {
168
+ "oneOf": [
169
+ {
170
+ "type": "string",
171
+ "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$"
172
+ },
173
+ {
174
+ "type": "string",
175
+ "minLength": 4,
176
+ "maxLength": 255,
177
+ "pattern": ".*{{.+}}.*"
178
+ }
179
+ ]
180
+ },
181
+ "deviceTags": {
182
+ "type": "array",
183
+ "maxItems": 100,
184
+ "items": {
185
+ "type": "object",
186
+ "properties": {
187
+ "key": {
188
+ "oneOf": [
189
+ {
190
+ "type": "string",
191
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
192
+ },
193
+ {
194
+ "type": "string",
195
+ "minLength": 4,
196
+ "maxLength": 255,
197
+ "pattern": ".*{{.+}}.*"
198
+ }
199
+ ]
200
+ },
201
+ "value": {
202
+ "type": "string",
203
+ "minLength": 1,
204
+ "maxLength": 255
205
+ }
206
+ },
207
+ "additionalProperties": false
208
+ }
209
+ },
210
+ "deviceIds": {
211
+ "type": "array",
212
+ "maxItems": 100,
213
+ "items": {
214
+ "oneOf": [
215
+ {
216
+ "type": "string",
217
+ "pattern": "^[A-Fa-f\\d]{24}$"
218
+ },
219
+ {
220
+ "type": "string",
221
+ "minLength": 4,
222
+ "maxLength": 255,
223
+ "pattern": ".*{{.+}}.*"
224
+ }
225
+ ]
226
+ }
227
+ },
228
+ "queryJson": {
229
+ "type": "string",
230
+ "maxLength": 8192
231
+ },
232
+ "start": {
233
+ "type": "number"
234
+ },
235
+ "end": {
236
+ "type": "number"
237
+ }
238
+ },
239
+ "required": [
240
+ "inputType",
241
+ "fileName",
242
+ "start",
243
+ "end"
244
+ ],
245
+ "additionalProperties": false
246
+ },
151
247
  {
152
248
  "type": "object",
153
249
  "properties": {
data/schemas/org.json CHANGED
@@ -422,7 +422,7 @@
422
422
  "type": "array",
423
423
  "items": {
424
424
  "type": "string",
425
- "maxLength": 1024,
425
+ "maxLength": 45,
426
426
  "minLength": 3
427
427
  }
428
428
  }
@@ -28,6 +28,9 @@
28
28
  },
29
29
  "ttl": {
30
30
  "type": "number"
31
+ },
32
+ "disallowTransfer": {
33
+ "type": "boolean"
31
34
  }
32
35
  }
33
36
  }
@@ -68,6 +68,9 @@
68
68
  "additionalProperties": false
69
69
  },
70
70
  "maxItems": 1000
71
+ },
72
+ "disallowTransfer": {
73
+ "type": "boolean"
71
74
  }
72
75
  },
73
76
  "additionalProperties": false,
@@ -84,6 +84,9 @@
84
84
  },
85
85
  "hasExpired": {
86
86
  "type": "boolean"
87
+ },
88
+ "disallowTransfer": {
89
+ "type": "boolean"
87
90
  }
88
91
  }
89
92
  }
@@ -33,7 +33,7 @@
33
33
  "maxItems": 25,
34
34
  "items": {
35
35
  "type": "string",
36
- "maxLength": 1024,
36
+ "maxLength": 45,
37
37
  "minLength": 3
38
38
  }
39
39
  }
data/schemas/orgs.json CHANGED
@@ -429,7 +429,7 @@
429
429
  "type": "array",
430
430
  "items": {
431
431
  "type": "string",
432
- "maxLength": 1024,
432
+ "maxLength": 45,
433
433
  "minLength": 3
434
434
  }
435
435
  }
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "password": {
15
15
  "type": "string",
16
- "minLength": 8,
16
+ "minLength": 12,
17
17
  "maxLength": 2048,
18
- "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
18
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
19
19
  }
20
20
  },
21
21
  "required": [
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "SAMLDomain": {
11
11
  "type": "string",
12
- "maxLength": 1024,
12
+ "maxLength": 45,
13
13
  "minLength": 3
14
14
  }
15
15
  },
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "tagKeys": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "string",
9
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
10
+ },
11
+ "maxItems": 1000
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "tagKey": {
6
+ "type": "string",
7
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
8
+ },
9
+ "tagValues": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 255
15
+ },
16
+ "maxItems": 1000
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "properties": {
4
+ "keywords": {
5
+ "type": "array",
6
+ "items": {
7
+ "type": "string",
8
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
9
+ },
10
+ "maxItems": 100
11
+ }
12
+ },
13
+ "additionalProperties": false
14
+ }
@@ -89,8 +89,18 @@
89
89
  "type": "object",
90
90
  "properties": {
91
91
  "value": {
92
- "type": "string",
93
- "maxLength": 255
92
+ "oneOf": [
93
+ {
94
+ "type": "string",
95
+ "maxLength": 255
96
+ },
97
+ {
98
+ "type": "number"
99
+ },
100
+ {
101
+ "type": "boolean"
102
+ }
103
+ ]
94
104
  }
95
105
  },
96
106
  "additionalProperties": false,
@@ -17,23 +17,103 @@
17
17
  "aggregation": {
18
18
  "oneOf": [
19
19
  {
20
- "type": "string",
21
- "enum": [
22
- "FIRST",
23
- "LAST",
24
- "COUNT",
25
- "MAX",
26
- "MIN",
27
- "MEDIAN",
28
- "MEAN",
29
- "SUM",
30
- "STD_DEV"
20
+ "oneOf": [
21
+ {
22
+ "type": "string",
23
+ "enum": [
24
+ "FIRST",
25
+ "LAST",
26
+ "COUNT",
27
+ "MAX",
28
+ "MIN",
29
+ "MEDIAN",
30
+ "MEAN",
31
+ "SUM",
32
+ "STD_DEV"
33
+ ]
34
+ },
35
+ {
36
+ "type": "string",
37
+ "enum": [
38
+ "NONE"
39
+ ]
40
+ }
31
41
  ]
32
42
  },
33
43
  {
34
- "type": "string",
35
- "enum": [
36
- "NONE"
44
+ "type": "object",
45
+ "properties": {
46
+ "type": {
47
+ "oneOf": [
48
+ {
49
+ "type": "string",
50
+ "enum": [
51
+ "FIRST",
52
+ "LAST",
53
+ "COUNT",
54
+ "MAX",
55
+ "MIN",
56
+ "MEDIAN",
57
+ "MEAN",
58
+ "SUM",
59
+ "STD_DEV"
60
+ ]
61
+ },
62
+ {
63
+ "type": "string",
64
+ "enum": [
65
+ "NONE"
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ "options": {
71
+ "type": "object",
72
+ "additionalProperties": false
73
+ }
74
+ },
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "type"
78
+ ]
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "type": {
84
+ "type": "string",
85
+ "enum": [
86
+ "TIMEATVALUE"
87
+ ]
88
+ },
89
+ "options": {
90
+ "type": "object",
91
+ "properties": {
92
+ "value": {
93
+ "oneOf": [
94
+ {
95
+ "type": "string",
96
+ "maxLength": 255
97
+ },
98
+ {
99
+ "type": "number"
100
+ },
101
+ {
102
+ "type": "boolean"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "value"
110
+ ]
111
+ }
112
+ },
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "type",
116
+ "options"
37
117
  ]
38
118
  }
39
119
  ]