losant_rest 1.8.5 → 1.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/_schemas.md +2209 -127
- data/docs/application.md +4 -2
- data/docs/applications.md +4 -2
- data/docs/data.md +41 -0
- data/docs/me.md +4 -2
- data/docs/notebook.md +305 -0
- data/docs/notebooks.md +93 -0
- data/docs/org.md +8 -2
- data/docs/orgs.md +4 -2
- data/lib/losant_rest/application.rb +6 -2
- data/lib/losant_rest/applications.rb +6 -2
- data/lib/losant_rest/client.rb +10 -2
- data/lib/losant_rest/data.rb +47 -0
- data/lib/losant_rest/me.rb +6 -2
- data/lib/losant_rest/notebook.rb +322 -0
- data/lib/losant_rest/notebooks.rb +136 -0
- data/lib/losant_rest/org.rb +14 -2
- data/lib/losant_rest/orgs.rb +6 -2
- data/lib/losant_rest/version.rb +1 -1
- data/lib/losant_rest.rb +2 -0
- data/schemas/application.json +15 -4
- data/schemas/applicationApiTokenPost.json +12 -0
- data/schemas/applications.json +15 -4
- data/schemas/dataExport.json +65 -0
- data/schemas/deviceCredentials.json +1 -0
- data/schemas/edgeDeployment.json +2 -1
- data/schemas/edgeDeployments.json +2 -1
- data/schemas/event.json +4 -2
- data/schemas/events.json +4 -2
- data/schemas/file.json +2 -1
- data/schemas/fileUploadPostResponse.json +20 -26
- data/schemas/files.json +2 -1
- data/schemas/flow.json +1 -0
- data/schemas/flowPatch.json +1 -0
- data/schemas/flowPost.json +1 -0
- data/schemas/flowVersion.json +2 -0
- data/schemas/flowVersionPost.json +1 -0
- data/schemas/flowVersions.json +2 -0
- data/schemas/flows.json +1 -0
- data/schemas/flowsImportPost.json +2 -0
- data/schemas/flowsImportResult.json +3 -0
- data/schemas/githubLogin.json +12 -0
- data/schemas/me.json +28 -8
- data/schemas/notebook.json +322 -0
- data/schemas/notebookDataExportOptions.json +34 -0
- data/schemas/notebookExecutionLogs.json +125 -0
- data/schemas/notebookExecutionOptions.json +29 -0
- data/schemas/notebookPatch.json +295 -0
- data/schemas/notebookPost.json +298 -0
- data/schemas/notebooks.json +364 -0
- data/schemas/org.json +27 -10
- data/schemas/orgs.json +27 -10
- data/schemas/userCredentials.json +12 -0
- data/schemas/userPost.json +12 -0
- metadata +14 -2
@@ -0,0 +1,322 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"id": {
|
6
|
+
"type": "string",
|
7
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
8
|
+
},
|
9
|
+
"notebookId": {
|
10
|
+
"type": "string",
|
11
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
12
|
+
},
|
13
|
+
"applicationId": {
|
14
|
+
"type": "string",
|
15
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
16
|
+
},
|
17
|
+
"creationDate": {
|
18
|
+
"type": "string",
|
19
|
+
"format": "date-time"
|
20
|
+
},
|
21
|
+
"lastUpdated": {
|
22
|
+
"type": "string",
|
23
|
+
"format": "date-time"
|
24
|
+
},
|
25
|
+
"name": {
|
26
|
+
"type": "string",
|
27
|
+
"minLength": 1,
|
28
|
+
"maxLength": 1024
|
29
|
+
},
|
30
|
+
"description": {
|
31
|
+
"type": "string",
|
32
|
+
"maxLength": 32767
|
33
|
+
},
|
34
|
+
"jupyterFileName": {
|
35
|
+
"type": "string",
|
36
|
+
"minLength": 1,
|
37
|
+
"maxLength": 1024
|
38
|
+
},
|
39
|
+
"jupyterFileUrl": {
|
40
|
+
"type": "string"
|
41
|
+
},
|
42
|
+
"inputs": {
|
43
|
+
"type": "array",
|
44
|
+
"items": {
|
45
|
+
"maxItems": 100,
|
46
|
+
"oneOf": [
|
47
|
+
{
|
48
|
+
"type": "object",
|
49
|
+
"properties": {
|
50
|
+
"inputType": {
|
51
|
+
"type": "string",
|
52
|
+
"enum": [
|
53
|
+
"deviceData"
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"fileName": {
|
57
|
+
"type": "string",
|
58
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
59
|
+
},
|
60
|
+
"deviceTags": {
|
61
|
+
"type": "array",
|
62
|
+
"items": {
|
63
|
+
"type": "object",
|
64
|
+
"properties": {
|
65
|
+
"key": {
|
66
|
+
"type": "string",
|
67
|
+
"pattern": "^[0-9a-zA-Z_-]{1,255}$"
|
68
|
+
},
|
69
|
+
"value": {
|
70
|
+
"type": "string",
|
71
|
+
"minLength": 1,
|
72
|
+
"maxLength": 255
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"additionalProperties": false
|
76
|
+
},
|
77
|
+
"maxItems": 100
|
78
|
+
},
|
79
|
+
"deviceIds": {
|
80
|
+
"type": "array",
|
81
|
+
"items": {
|
82
|
+
"type": "string",
|
83
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
84
|
+
},
|
85
|
+
"maxItems": 1000
|
86
|
+
},
|
87
|
+
"attributes": {
|
88
|
+
"type": "array",
|
89
|
+
"maxItems": 100,
|
90
|
+
"items": {
|
91
|
+
"type": "string",
|
92
|
+
"pattern": "^[0-9a-zA-Z_-]{1,255}$"
|
93
|
+
}
|
94
|
+
},
|
95
|
+
"start": {
|
96
|
+
"type": "number"
|
97
|
+
},
|
98
|
+
"end": {
|
99
|
+
"type": "number"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"required": [
|
103
|
+
"inputType",
|
104
|
+
"fileName",
|
105
|
+
"start",
|
106
|
+
"end"
|
107
|
+
],
|
108
|
+
"additionalProperties": false
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"type": "object",
|
112
|
+
"properties": {
|
113
|
+
"inputType": {
|
114
|
+
"type": "string",
|
115
|
+
"enum": [
|
116
|
+
"deviceMetadata"
|
117
|
+
]
|
118
|
+
},
|
119
|
+
"fileName": {
|
120
|
+
"type": "string",
|
121
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
122
|
+
},
|
123
|
+
"deviceTags": {
|
124
|
+
"type": "array",
|
125
|
+
"items": {
|
126
|
+
"type": "object",
|
127
|
+
"properties": {
|
128
|
+
"key": {
|
129
|
+
"type": "string",
|
130
|
+
"pattern": "^[0-9a-zA-Z_-]{1,255}$"
|
131
|
+
},
|
132
|
+
"value": {
|
133
|
+
"type": "string",
|
134
|
+
"minLength": 1,
|
135
|
+
"maxLength": 255
|
136
|
+
}
|
137
|
+
},
|
138
|
+
"additionalProperties": false
|
139
|
+
},
|
140
|
+
"maxItems": 100
|
141
|
+
},
|
142
|
+
"deviceIds": {
|
143
|
+
"type": "array",
|
144
|
+
"items": {
|
145
|
+
"type": "string",
|
146
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
147
|
+
},
|
148
|
+
"maxItems": 1000
|
149
|
+
}
|
150
|
+
},
|
151
|
+
"required": [
|
152
|
+
"inputType",
|
153
|
+
"fileName"
|
154
|
+
],
|
155
|
+
"additionalProperties": false
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"type": "object",
|
159
|
+
"properties": {
|
160
|
+
"inputType": {
|
161
|
+
"type": "string",
|
162
|
+
"enum": [
|
163
|
+
"dataTable"
|
164
|
+
]
|
165
|
+
},
|
166
|
+
"fileName": {
|
167
|
+
"type": "string",
|
168
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
169
|
+
},
|
170
|
+
"dataTableId": {
|
171
|
+
"type": "string",
|
172
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
173
|
+
},
|
174
|
+
"queryJson": {
|
175
|
+
"type": "string",
|
176
|
+
"maxLength": 32767
|
177
|
+
}
|
178
|
+
},
|
179
|
+
"required": [
|
180
|
+
"inputType",
|
181
|
+
"fileName",
|
182
|
+
"dataTableId"
|
183
|
+
],
|
184
|
+
"additionalProperties": false
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"type": "object",
|
188
|
+
"properties": {
|
189
|
+
"inputType": {
|
190
|
+
"type": "string",
|
191
|
+
"enum": [
|
192
|
+
"externalUrl"
|
193
|
+
]
|
194
|
+
},
|
195
|
+
"fileName": {
|
196
|
+
"type": "string",
|
197
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
198
|
+
},
|
199
|
+
"sourceUrl": {
|
200
|
+
"type": "string",
|
201
|
+
"minLength": 1,
|
202
|
+
"maxLength": 1024
|
203
|
+
}
|
204
|
+
},
|
205
|
+
"required": [
|
206
|
+
"inputType",
|
207
|
+
"fileName",
|
208
|
+
"sourceUrl"
|
209
|
+
],
|
210
|
+
"additionalProperties": false
|
211
|
+
}
|
212
|
+
]
|
213
|
+
}
|
214
|
+
},
|
215
|
+
"outputs": {
|
216
|
+
"type": "array",
|
217
|
+
"items": {
|
218
|
+
"maxItems": 100,
|
219
|
+
"oneOf": [
|
220
|
+
{
|
221
|
+
"type": "object",
|
222
|
+
"properties": {
|
223
|
+
"outputType": {
|
224
|
+
"type": "string",
|
225
|
+
"enum": [
|
226
|
+
"dataTable"
|
227
|
+
]
|
228
|
+
},
|
229
|
+
"fileName": {
|
230
|
+
"type": "string",
|
231
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
232
|
+
},
|
233
|
+
"dataTableId": {
|
234
|
+
"type": "string",
|
235
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
236
|
+
},
|
237
|
+
"createMissingColumns": {
|
238
|
+
"type": "boolean"
|
239
|
+
},
|
240
|
+
"truncateExistingTable": {
|
241
|
+
"type": "boolean"
|
242
|
+
}
|
243
|
+
},
|
244
|
+
"required": [
|
245
|
+
"fileName",
|
246
|
+
"outputType",
|
247
|
+
"dataTableId"
|
248
|
+
],
|
249
|
+
"additionalProperties": false
|
250
|
+
},
|
251
|
+
{
|
252
|
+
"type": "object",
|
253
|
+
"properties": {
|
254
|
+
"outputType": {
|
255
|
+
"type": "string",
|
256
|
+
"enum": [
|
257
|
+
"file"
|
258
|
+
]
|
259
|
+
},
|
260
|
+
"fileName": {
|
261
|
+
"type": "string",
|
262
|
+
"pattern": "^[0-9a-zA-Z_.-]{1,255}$"
|
263
|
+
},
|
264
|
+
"destinationDirectoryTemplate": {
|
265
|
+
"type": "string",
|
266
|
+
"minLength": 1,
|
267
|
+
"maxLength": 1024
|
268
|
+
},
|
269
|
+
"destinationFileNameTemplate": {
|
270
|
+
"type": "string",
|
271
|
+
"minLength": 1,
|
272
|
+
"maxLength": 1024
|
273
|
+
}
|
274
|
+
},
|
275
|
+
"required": [
|
276
|
+
"fileName",
|
277
|
+
"outputType",
|
278
|
+
"destinationFileNameTemplate"
|
279
|
+
],
|
280
|
+
"additionalProperties": false
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"type": "object",
|
284
|
+
"properties": {
|
285
|
+
"outputType": {
|
286
|
+
"type": "string",
|
287
|
+
"enum": [
|
288
|
+
"executionResult"
|
289
|
+
]
|
290
|
+
},
|
291
|
+
"fileName": {
|
292
|
+
"type": "string",
|
293
|
+
"enum": [
|
294
|
+
"result.html",
|
295
|
+
"result.pdf",
|
296
|
+
"result.ipynb",
|
297
|
+
"result.error.log",
|
298
|
+
"result.log"
|
299
|
+
]
|
300
|
+
},
|
301
|
+
"destinationDirectoryTemplate": {
|
302
|
+
"type": "string",
|
303
|
+
"minLength": 1,
|
304
|
+
"maxLength": 1024
|
305
|
+
},
|
306
|
+
"destinationFileNameTemplate": {
|
307
|
+
"type": "string",
|
308
|
+
"minLength": 1,
|
309
|
+
"maxLength": 1024
|
310
|
+
}
|
311
|
+
},
|
312
|
+
"required": [
|
313
|
+
"fileName",
|
314
|
+
"outputType"
|
315
|
+
],
|
316
|
+
"additionalProperties": false
|
317
|
+
}
|
318
|
+
]
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"email": {
|
6
|
+
"type": "string",
|
7
|
+
"format": "email",
|
8
|
+
"maxLength": 1024
|
9
|
+
},
|
10
|
+
"relativeTo": {
|
11
|
+
"oneOf": [
|
12
|
+
{
|
13
|
+
"type": "string"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"type": "number"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"type": "object",
|
20
|
+
"properties": {
|
21
|
+
"$date": {
|
22
|
+
"type": "string"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"additionalProperties": false,
|
26
|
+
"required": [
|
27
|
+
"$date"
|
28
|
+
]
|
29
|
+
}
|
30
|
+
]
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"additionalProperties": false
|
34
|
+
}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "array",
|
4
|
+
"items": {
|
5
|
+
"type": "object",
|
6
|
+
"properties": {
|
7
|
+
"id": {
|
8
|
+
"type": "string",
|
9
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
10
|
+
},
|
11
|
+
"notebookExecutionId": {
|
12
|
+
"type": "string",
|
13
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
14
|
+
},
|
15
|
+
"notebookId": {
|
16
|
+
"type": "string",
|
17
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
18
|
+
},
|
19
|
+
"applicationId": {
|
20
|
+
"type": "string",
|
21
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
22
|
+
},
|
23
|
+
"status": {
|
24
|
+
"type": "string",
|
25
|
+
"enum": [
|
26
|
+
"queued",
|
27
|
+
"inProgress",
|
28
|
+
"completed",
|
29
|
+
"errored",
|
30
|
+
"timeout"
|
31
|
+
]
|
32
|
+
},
|
33
|
+
"executionRelativeTo": {
|
34
|
+
"type": "string",
|
35
|
+
"format": "date-time"
|
36
|
+
},
|
37
|
+
"maxAllowedRunMinutes": {
|
38
|
+
"type": "number"
|
39
|
+
},
|
40
|
+
"sourceType": {
|
41
|
+
"type": "string",
|
42
|
+
"enum": [
|
43
|
+
"flow",
|
44
|
+
"user",
|
45
|
+
"device",
|
46
|
+
"apiToken",
|
47
|
+
"notebook"
|
48
|
+
]
|
49
|
+
},
|
50
|
+
"sourceId": {
|
51
|
+
"type": "string",
|
52
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
53
|
+
},
|
54
|
+
"runQueuedAt": {
|
55
|
+
"type": "string",
|
56
|
+
"format": "date-time"
|
57
|
+
},
|
58
|
+
"runStartedAt": {
|
59
|
+
"type": "string",
|
60
|
+
"format": "date-time"
|
61
|
+
},
|
62
|
+
"inputsCompletedAt": {
|
63
|
+
"type": "string",
|
64
|
+
"format": "date-time"
|
65
|
+
},
|
66
|
+
"notebookCompletedAt": {
|
67
|
+
"type": "string",
|
68
|
+
"format": "date-time"
|
69
|
+
},
|
70
|
+
"outputsCompletedAt": {
|
71
|
+
"type": "string",
|
72
|
+
"format": "date-time"
|
73
|
+
},
|
74
|
+
"inputInfo": {
|
75
|
+
"type": "object",
|
76
|
+
"patternProperties": {
|
77
|
+
".*": {
|
78
|
+
"type": "object",
|
79
|
+
"properties": {
|
80
|
+
"size": {
|
81
|
+
"type": "number"
|
82
|
+
},
|
83
|
+
"url": {
|
84
|
+
"type": "string"
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"outputInfo": {
|
91
|
+
"type": "object",
|
92
|
+
"patternProperties": {
|
93
|
+
".*": {
|
94
|
+
"type": "object",
|
95
|
+
"properties": {
|
96
|
+
"size": {
|
97
|
+
"type": "number"
|
98
|
+
},
|
99
|
+
"url": {
|
100
|
+
"type": "string"
|
101
|
+
},
|
102
|
+
"contentType": {
|
103
|
+
"type": "string"
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
},
|
109
|
+
"executionErrors": {
|
110
|
+
"type": "array",
|
111
|
+
"items": {
|
112
|
+
"type": "object",
|
113
|
+
"properties": {
|
114
|
+
"name": {
|
115
|
+
"type": "string"
|
116
|
+
},
|
117
|
+
"message": {
|
118
|
+
"type": "string"
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"relativeTo": {
|
6
|
+
"oneOf": [
|
7
|
+
{
|
8
|
+
"type": "string"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"type": "number"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"type": "object",
|
15
|
+
"properties": {
|
16
|
+
"$date": {
|
17
|
+
"type": "string"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"additionalProperties": false,
|
21
|
+
"required": [
|
22
|
+
"$date"
|
23
|
+
]
|
24
|
+
}
|
25
|
+
]
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"additionalProperties": false
|
29
|
+
}
|