losant_rest 1.9.3 → 1.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +17405 -2766
  3. data/docs/application.md +85 -0
  4. data/docs/applicationApiTokens.md +1 -1
  5. data/docs/applicationTemplate.md +46 -0
  6. data/docs/applicationTemplates.md +76 -1
  7. data/docs/device.md +7 -3
  8. data/docs/devices.md +92 -4
  9. data/docs/experienceEndpoints.md +1 -0
  10. data/docs/file.md +4 -4
  11. data/docs/flow.md +94 -1
  12. data/docs/flowVersion.md +96 -1
  13. data/docs/me.md +0 -36
  14. data/lib/losant_rest.rb +1 -0
  15. data/lib/losant_rest/application.rb +48 -0
  16. data/lib/losant_rest/application_api_tokens.rb +1 -1
  17. data/lib/losant_rest/application_template.rb +79 -0
  18. data/lib/losant_rest/application_templates.rb +89 -1
  19. data/lib/losant_rest/client.rb +6 -2
  20. data/lib/losant_rest/device.rb +11 -3
  21. data/lib/losant_rest/devices.rb +103 -3
  22. data/lib/losant_rest/experience_endpoints.rb +2 -0
  23. data/lib/losant_rest/file.rb +3 -3
  24. data/lib/losant_rest/flow.rb +115 -1
  25. data/lib/losant_rest/flow_version.rb +115 -1
  26. data/lib/losant_rest/me.rb +0 -41
  27. data/lib/losant_rest/version.rb +1 -1
  28. data/schemas/advancedDeviceQuery.json +117 -0
  29. data/schemas/advancedEventQuery.json +205 -0
  30. data/schemas/advancedQuery.json +34 -3
  31. data/schemas/application.json +13 -0
  32. data/schemas/applicationApiTokenPost.json +9 -1
  33. data/schemas/applicationApplyTemplatePatch.json +19 -0
  34. data/schemas/applicationCreationByTemplateResult.json +13 -0
  35. data/schemas/applicationPatch.json +5 -0
  36. data/schemas/applicationPost.json +13 -0
  37. data/schemas/applicationTemplate.json +32 -0
  38. data/schemas/applicationTemplateCategories.json +43 -0
  39. data/schemas/applicationTemplateCategory.json +23 -0
  40. data/schemas/applicationTemplates.json +44 -0
  41. data/schemas/applications.json +13 -0
  42. data/schemas/changePassword.json +2 -2
  43. data/schemas/dashboard.json +1285 -145
  44. data/schemas/dashboardPatch.json +1285 -145
  45. data/schemas/dashboardPost.json +1285 -145
  46. data/schemas/dashboards.json +1285 -145
  47. data/schemas/dataExport.json +142 -0
  48. data/schemas/dataTableRowsExport.json +34 -3
  49. data/schemas/device.json +16 -3
  50. data/schemas/devicePatch.json +16 -3
  51. data/schemas/devicePost.json +16 -3
  52. data/schemas/deviceRecipe.json +16 -3
  53. data/schemas/deviceRecipePatch.json +16 -3
  54. data/schemas/deviceRecipePost.json +16 -3
  55. data/schemas/deviceRecipes.json +16 -3
  56. data/schemas/devices.json +16 -3
  57. data/schemas/devicesDataRemoved.json +12 -0
  58. data/schemas/devicesDeletePost.json +1034 -0
  59. data/schemas/devicesDeleted.json +12 -0
  60. data/schemas/devicesExportPost.json +1035 -0
  61. data/schemas/devicesPatch.json +1773 -7
  62. data/schemas/devicesRemoveDataPost.json +1056 -0
  63. data/schemas/devicesUpdated.json +18 -0
  64. data/schemas/eventPost.json +22 -0
  65. data/schemas/eventsExport.json +205 -0
  66. data/schemas/experienceDomain.json +1 -1
  67. data/schemas/experienceDomainPatch.json +1 -1
  68. data/schemas/experienceDomainPost.json +1 -1
  69. data/schemas/experienceDomains.json +1 -1
  70. data/schemas/experienceGroup.json +7 -0
  71. data/schemas/experienceGroupPatch.json +7 -0
  72. data/schemas/experienceGroupPost.json +7 -0
  73. data/schemas/experienceGroups.json +7 -0
  74. data/schemas/experienceLinkedResources.json +348 -3
  75. data/schemas/experienceVersion.json +1 -1
  76. data/schemas/experienceVersions.json +1 -1
  77. data/schemas/flow.json +116 -1
  78. data/schemas/flowErrors.json +87 -0
  79. data/schemas/flowPatch.json +116 -1
  80. data/schemas/flowPost.json +116 -1
  81. data/schemas/flowStats.json +54 -0
  82. data/schemas/flowVersion.json +232 -2
  83. data/schemas/flowVersionPost.json +116 -1
  84. data/schemas/flowVersions.json +232 -2
  85. data/schemas/flows.json +116 -1
  86. data/schemas/flowsImportPost.json +232 -2
  87. data/schemas/flowsImportResult.json +348 -3
  88. data/schemas/githubLogin.json +15 -4
  89. data/schemas/me.json +0 -3
  90. data/schemas/mePatch.json +2 -2
  91. data/schemas/multiDeviceCommand.json +1019 -0
  92. data/schemas/notebook.json +99 -2
  93. data/schemas/notebookPatch.json +99 -2
  94. data/schemas/notebookPost.json +99 -2
  95. data/schemas/notebooks.json +99 -2
  96. data/schemas/org.json +1 -1
  97. data/schemas/orgInviteInfo.json +3 -0
  98. data/schemas/orgInvitePost.json +3 -0
  99. data/schemas/orgInvites.json +3 -0
  100. data/schemas/orgPatch.json +1 -1
  101. data/schemas/orgPost.json +0 -9
  102. data/schemas/orgs.json +1 -1
  103. data/schemas/passwordResetFinish.json +2 -2
  104. data/schemas/samlResponse.json +1 -1
  105. data/schemas/templateKeywords.json +14 -0
  106. data/schemas/timeSeriesData.json +101 -12
  107. data/schemas/timeSeriesQuery.json +101 -12
  108. data/schemas/userCredentials.json +13 -3
  109. data/schemas/userPost.json +21 -7
  110. metadata +19 -5
@@ -7,6 +7,10 @@
7
7
  "format": "email",
8
8
  "maxLength": 1024
9
9
  },
10
+ "callbackUrl": {
11
+ "type": "string",
12
+ "maxLength": 1024
13
+ },
10
14
  "deviceIds": {
11
15
  "type": "array",
12
16
  "items": {
@@ -34,6 +38,140 @@
34
38
  },
35
39
  "maxItems": 100
36
40
  },
41
+ "deviceQuery": {
42
+ "title": "Advanced Query",
43
+ "description": "Schema for advanced filters and queries",
44
+ "type": "object",
45
+ "properties": {
46
+ "$and": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/advancedQuery"
50
+ },
51
+ "maxItems": 100
52
+ },
53
+ "$or": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "#/definitions/advancedQuery"
57
+ },
58
+ "maxItems": 100
59
+ },
60
+ "$nor": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "#/definitions/advancedQuery"
64
+ },
65
+ "maxItems": 100
66
+ }
67
+ },
68
+ "patternProperties": {
69
+ "^[0-9a-zA-Z_-]{1,255}$": {
70
+ "oneOf": [
71
+ {
72
+ "type": [
73
+ "string",
74
+ "number",
75
+ "boolean",
76
+ "null"
77
+ ]
78
+ },
79
+ {
80
+ "type": "object",
81
+ "properties": {
82
+ "$eq": {
83
+ "type": [
84
+ "string",
85
+ "number",
86
+ "boolean",
87
+ "null"
88
+ ]
89
+ },
90
+ "$ne": {
91
+ "type": [
92
+ "string",
93
+ "number",
94
+ "boolean",
95
+ "null"
96
+ ]
97
+ },
98
+ "$gt": {
99
+ "type": [
100
+ "string",
101
+ "number",
102
+ "boolean",
103
+ "null"
104
+ ]
105
+ },
106
+ "$lt": {
107
+ "type": [
108
+ "string",
109
+ "number",
110
+ "boolean",
111
+ "null"
112
+ ]
113
+ },
114
+ "$gte": {
115
+ "type": [
116
+ "string",
117
+ "number",
118
+ "boolean",
119
+ "null"
120
+ ]
121
+ },
122
+ "$lte": {
123
+ "type": [
124
+ "string",
125
+ "number",
126
+ "boolean",
127
+ "null"
128
+ ]
129
+ },
130
+ "$startsWith": {
131
+ "type": "string",
132
+ "minLength": 1
133
+ },
134
+ "$endsWith": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ },
138
+ "$contains": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "$ci": {
143
+ "type": "boolean"
144
+ },
145
+ "$in": {
146
+ "type": "array",
147
+ "maxItems": 100,
148
+ "items": {
149
+ "type": [
150
+ "string",
151
+ "number",
152
+ "boolean"
153
+ ]
154
+ }
155
+ },
156
+ "$nin": {
157
+ "type": "array",
158
+ "maxItems": 100,
159
+ "items": {
160
+ "type": [
161
+ "string",
162
+ "number",
163
+ "boolean"
164
+ ]
165
+ }
166
+ }
167
+ },
168
+ "additionalProperties": false
169
+ }
170
+ ]
171
+ }
172
+ },
173
+ "additionalProperties": false
174
+ },
37
175
  "attributes": {
38
176
  "type": "array",
39
177
  "items": {
@@ -57,6 +195,10 @@
57
195
  "includeID": {
58
196
  "type": "boolean",
59
197
  "default": true
198
+ },
199
+ "includeBlobData": {
200
+ "type": "boolean",
201
+ "default": false
60
202
  }
61
203
  }
62
204
  }
@@ -16,17 +16,26 @@
16
16
  "type": "array",
17
17
  "items": {
18
18
  "$ref": "#/definitions/advancedQuery"
19
- }
19
+ },
20
+ "maxItems": 100
20
21
  },
21
22
  "$or": {
22
23
  "type": "array",
23
24
  "items": {
24
25
  "$ref": "#/definitions/advancedQuery"
25
- }
26
+ },
27
+ "maxItems": 100
28
+ },
29
+ "$nor": {
30
+ "type": "array",
31
+ "items": {
32
+ "$ref": "#/definitions/advancedQuery"
33
+ },
34
+ "maxItems": 100
26
35
  }
27
36
  },
28
37
  "patternProperties": {
29
- "^[0-9a-zA-Z_-]{1,255}": {
38
+ "^[0-9a-zA-Z_-]{1,255}$": {
30
39
  "oneOf": [
31
40
  {
32
41
  "type": [
@@ -101,6 +110,28 @@
101
110
  },
102
111
  "$ci": {
103
112
  "type": "boolean"
113
+ },
114
+ "$in": {
115
+ "type": "array",
116
+ "maxItems": 100,
117
+ "items": {
118
+ "type": [
119
+ "string",
120
+ "number",
121
+ "boolean"
122
+ ]
123
+ }
124
+ },
125
+ "$nin": {
126
+ "type": "array",
127
+ "maxItems": 100,
128
+ "items": {
129
+ "type": [
130
+ "string",
131
+ "number",
132
+ "boolean"
133
+ ]
134
+ }
104
135
  }
105
136
  },
106
137
  "additionalProperties": false
@@ -69,9 +69,14 @@
69
69
  "string",
70
70
  "number",
71
71
  "gps",
72
- "boolean"
72
+ "boolean",
73
+ "blob"
73
74
  ]
74
75
  },
76
+ "contentType": {
77
+ "type": "string",
78
+ "maxLength": 64
79
+ },
75
80
  "description": {
76
81
  "type": "string",
77
82
  "maxLength": 32767
@@ -101,10 +106,18 @@
101
106
  "MEDIAN",
102
107
  "MEAN",
103
108
  "SUM",
104
- "STD_DEV",
105
- "NONE"
109
+ "STD_DEV"
106
110
  ]
107
111
  },
112
+ "aggregationOptions": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "additionalProperties": false
117
+ },
118
+ "additionalProperties": false,
119
+ "maxItems": 0
120
+ },
108
121
  "childAttributes": {
109
122
  "type": "array",
110
123
  "items": {
@@ -49,9 +49,14 @@
49
49
  "string",
50
50
  "number",
51
51
  "gps",
52
- "boolean"
52
+ "boolean",
53
+ "blob"
53
54
  ]
54
55
  },
56
+ "contentType": {
57
+ "type": "string",
58
+ "maxLength": 64
59
+ },
55
60
  "description": {
56
61
  "type": "string",
57
62
  "maxLength": 32767
@@ -81,10 +86,18 @@
81
86
  "MEDIAN",
82
87
  "MEAN",
83
88
  "SUM",
84
- "STD_DEV",
85
- "NONE"
89
+ "STD_DEV"
86
90
  ]
87
91
  },
92
+ "aggregationOptions": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "object",
96
+ "additionalProperties": false
97
+ },
98
+ "additionalProperties": false,
99
+ "maxItems": 0
100
+ },
88
101
  "childAttributes": {
89
102
  "type": "array",
90
103
  "items": {
@@ -49,9 +49,14 @@
49
49
  "string",
50
50
  "number",
51
51
  "gps",
52
- "boolean"
52
+ "boolean",
53
+ "blob"
53
54
  ]
54
55
  },
56
+ "contentType": {
57
+ "type": "string",
58
+ "maxLength": 64
59
+ },
55
60
  "description": {
56
61
  "type": "string",
57
62
  "maxLength": 32767
@@ -81,10 +86,18 @@
81
86
  "MEDIAN",
82
87
  "MEAN",
83
88
  "SUM",
84
- "STD_DEV",
85
- "NONE"
89
+ "STD_DEV"
86
90
  ]
87
91
  },
92
+ "aggregationOptions": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "object",
96
+ "additionalProperties": false
97
+ },
98
+ "additionalProperties": false,
99
+ "maxItems": 0
100
+ },
88
101
  "childAttributes": {
89
102
  "type": "array",
90
103
  "items": {
@@ -78,9 +78,14 @@
78
78
  "string",
79
79
  "number",
80
80
  "gps",
81
- "boolean"
81
+ "boolean",
82
+ "blob"
82
83
  ]
83
84
  },
85
+ "contentType": {
86
+ "type": "string",
87
+ "maxLength": 64
88
+ },
84
89
  "description": {
85
90
  "type": "string",
86
91
  "maxLength": 32767
@@ -110,10 +115,18 @@
110
115
  "MEDIAN",
111
116
  "MEAN",
112
117
  "SUM",
113
- "STD_DEV",
114
- "NONE"
118
+ "STD_DEV"
115
119
  ]
116
120
  },
121
+ "aggregationOptions": {
122
+ "type": "array",
123
+ "items": {
124
+ "type": "object",
125
+ "additionalProperties": false
126
+ },
127
+ "additionalProperties": false,
128
+ "maxItems": 0
129
+ },
117
130
  "childAttributes": {
118
131
  "type": "array",
119
132
  "items": {
@@ -58,9 +58,14 @@
58
58
  "string",
59
59
  "number",
60
60
  "gps",
61
- "boolean"
61
+ "boolean",
62
+ "blob"
62
63
  ]
63
64
  },
65
+ "contentType": {
66
+ "type": "string",
67
+ "maxLength": 64
68
+ },
64
69
  "description": {
65
70
  "type": "string",
66
71
  "maxLength": 32767
@@ -90,10 +95,18 @@
90
95
  "MEDIAN",
91
96
  "MEAN",
92
97
  "SUM",
93
- "STD_DEV",
94
- "NONE"
98
+ "STD_DEV"
95
99
  ]
96
100
  },
101
+ "aggregationOptions": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "object",
105
+ "additionalProperties": false
106
+ },
107
+ "additionalProperties": false,
108
+ "maxItems": 0
109
+ },
97
110
  "childAttributes": {
98
111
  "type": "array",
99
112
  "items": {
@@ -58,9 +58,14 @@
58
58
  "string",
59
59
  "number",
60
60
  "gps",
61
- "boolean"
61
+ "boolean",
62
+ "blob"
62
63
  ]
63
64
  },
65
+ "contentType": {
66
+ "type": "string",
67
+ "maxLength": 64
68
+ },
64
69
  "description": {
65
70
  "type": "string",
66
71
  "maxLength": 32767
@@ -90,10 +95,18 @@
90
95
  "MEDIAN",
91
96
  "MEAN",
92
97
  "SUM",
93
- "STD_DEV",
94
- "NONE"
98
+ "STD_DEV"
95
99
  ]
96
100
  },
101
+ "aggregationOptions": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "object",
105
+ "additionalProperties": false
106
+ },
107
+ "additionalProperties": false,
108
+ "maxItems": 0
109
+ },
97
110
  "childAttributes": {
98
111
  "type": "array",
99
112
  "items": {
@@ -85,9 +85,14 @@
85
85
  "string",
86
86
  "number",
87
87
  "gps",
88
- "boolean"
88
+ "boolean",
89
+ "blob"
89
90
  ]
90
91
  },
92
+ "contentType": {
93
+ "type": "string",
94
+ "maxLength": 64
95
+ },
91
96
  "description": {
92
97
  "type": "string",
93
98
  "maxLength": 32767
@@ -117,10 +122,18 @@
117
122
  "MEDIAN",
118
123
  "MEAN",
119
124
  "SUM",
120
- "STD_DEV",
121
- "NONE"
125
+ "STD_DEV"
122
126
  ]
123
127
  },
128
+ "aggregationOptions": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "additionalProperties": false
133
+ },
134
+ "additionalProperties": false,
135
+ "maxItems": 0
136
+ },
124
137
  "childAttributes": {
125
138
  "type": "array",
126
139
  "items": {