losant_rest 1.8.6 → 1.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2143 -330
  3. data/docs/applicationCertificate.md +133 -0
  4. data/docs/applicationCertificateAuthorities.md +93 -0
  5. data/docs/applicationCertificateAuthority.md +133 -0
  6. data/docs/applicationCertificates.md +93 -0
  7. data/docs/auth.md +1 -1
  8. data/docs/dataTableRows.md +2 -0
  9. data/docs/events.md +1 -1
  10. data/docs/experienceUsers.md +2 -1
  11. data/lib/losant_rest.rb +4 -0
  12. data/lib/losant_rest/application_certificate.rb +174 -0
  13. data/lib/losant_rest/application_certificate_authorities.rb +136 -0
  14. data/lib/losant_rest/application_certificate_authority.rb +174 -0
  15. data/lib/losant_rest/application_certificates.rb +136 -0
  16. data/lib/losant_rest/auth.rb +1 -1
  17. data/lib/losant_rest/client.rb +18 -2
  18. data/lib/losant_rest/data_table_rows.rb +4 -0
  19. data/lib/losant_rest/events.rb +1 -1
  20. data/lib/losant_rest/experience_users.rb +3 -1
  21. data/lib/losant_rest/version.rb +1 -1
  22. data/schemas/applicationApiTokenPost.json +14 -0
  23. data/schemas/applicationCertificate.json +67 -0
  24. data/schemas/applicationCertificateAuthorities.json +93 -0
  25. data/schemas/applicationCertificateAuthority.json +51 -0
  26. data/schemas/applicationCertificateAuthorityPatch.json +26 -0
  27. data/schemas/applicationCertificateAuthorityPost.json +30 -0
  28. data/schemas/applicationCertificatePatch.json +21 -0
  29. data/schemas/applicationCertificatePost.json +51 -0
  30. data/schemas/applicationCertificates.json +109 -0
  31. data/schemas/dashboard.json +274 -72
  32. data/schemas/dashboardPatch.json +274 -72
  33. data/schemas/dashboardPost.json +274 -72
  34. data/schemas/dashboards.json +274 -72
  35. data/schemas/dataTableQuery.json +12 -0
  36. data/schemas/dataTableRowsExport.json +12 -0
  37. data/schemas/deviceCredentials.json +1 -3
  38. data/schemas/event.json +15 -0
  39. data/schemas/eventPatch.json +12 -1
  40. data/schemas/eventPost.json +16 -1
  41. data/schemas/events.json +15 -0
  42. data/schemas/experienceDomain.json +2 -6
  43. data/schemas/experienceDomainPatch.json +2 -6
  44. data/schemas/experienceDomainPost.json +2 -6
  45. data/schemas/experienceDomains.json +2 -6
  46. data/schemas/experienceGroup.json +38 -0
  47. data/schemas/experienceGroupPatch.json +38 -0
  48. data/schemas/experienceGroupPost.json +38 -0
  49. data/schemas/experienceGroups.json +38 -0
  50. data/schemas/flow.json +1 -0
  51. data/schemas/flowPatch.json +3 -2
  52. data/schemas/flowPost.json +1 -0
  53. data/schemas/flowVersion.json +2 -0
  54. data/schemas/flowVersionPost.json +1 -0
  55. data/schemas/flowVersions.json +2 -0
  56. data/schemas/flows.json +1 -0
  57. data/schemas/flowsImportPost.json +4 -2
  58. data/schemas/flowsImportResult.json +3 -0
  59. data/schemas/githubLogin.json +14 -0
  60. data/schemas/userCredentials.json +14 -0
  61. data/schemas/userPost.json +14 -0
  62. metadata +18 -2
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "status": {
11
+ "type": "string",
12
+ "enum": [
13
+ "active",
14
+ "inactive"
15
+ ]
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "maxLength": 32767
20
+ },
21
+ "caBundle": {
22
+ "$ref": "#/definitions/common/certificateString"
23
+ }
24
+ },
25
+ "additionalProperties": false
26
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "status": {
11
+ "type": "string",
12
+ "enum": [
13
+ "active",
14
+ "inactive"
15
+ ]
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "maxLength": 32767
20
+ },
21
+ "caBundle": {
22
+ "$ref": "#/definitions/common/certificateString"
23
+ }
24
+ },
25
+ "required": [
26
+ "name",
27
+ "caBundle"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "status": {
6
+ "type": "string",
7
+ "enum": [
8
+ "active",
9
+ "inactive"
10
+ ]
11
+ },
12
+ "description": {
13
+ "type": "string",
14
+ "maxLength": 32767
15
+ },
16
+ "certificate": {
17
+ "$ref": "#/definitions/common/certificateString"
18
+ }
19
+ },
20
+ "additionalProperties": false
21
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "status": {
6
+ "type": "string",
7
+ "enum": [
8
+ "active",
9
+ "inactive"
10
+ ]
11
+ },
12
+ "description": {
13
+ "type": "string",
14
+ "maxLength": 32767
15
+ },
16
+ "deviceIds": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "string",
20
+ "pattern": "^[A-Fa-f\\d]{24}$"
21
+ },
22
+ "maxItems": 1000
23
+ },
24
+ "deviceTags": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "properties": {
29
+ "key": {
30
+ "type": "string",
31
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
32
+ },
33
+ "value": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 255
37
+ }
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ "maxItems": 100
42
+ },
43
+ "certificate": {
44
+ "$ref": "#/definitions/common/certificateString"
45
+ }
46
+ },
47
+ "required": [
48
+ "certificate"
49
+ ],
50
+ "additionalProperties": false
51
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Application Certificate",
9
+ "description": "Schema for a single Application Certificate",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "applicationCertificateId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "applicationId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Fa-f\\d]{24}$"
23
+ },
24
+ "creationDate": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "lastUpdated": {
29
+ "type": "string",
30
+ "format": "date-time"
31
+ },
32
+ "status": {
33
+ "type": "string",
34
+ "enum": [
35
+ "active",
36
+ "inactive"
37
+ ]
38
+ },
39
+ "description": {
40
+ "type": "string",
41
+ "maxLength": 32767
42
+ },
43
+ "deviceIds": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string",
47
+ "pattern": "^[A-Fa-f\\d]{24}$"
48
+ },
49
+ "maxItems": 1000
50
+ },
51
+ "deviceTags": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "key": {
57
+ "type": "string",
58
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
59
+ },
60
+ "value": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 255
64
+ }
65
+ },
66
+ "additionalProperties": false
67
+ },
68
+ "maxItems": 100
69
+ },
70
+ "certificateInfo": {
71
+ "$ref": "#/definitions/certificateInfo"
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "count": {
77
+ "type": "integer"
78
+ },
79
+ "totalCount": {
80
+ "type": "integer"
81
+ },
82
+ "perPage": {
83
+ "type": "integer"
84
+ },
85
+ "page": {
86
+ "type": "integer"
87
+ },
88
+ "filter": {
89
+ "type": "string"
90
+ },
91
+ "filterField": {
92
+ "type": "string"
93
+ },
94
+ "sortField": {
95
+ "type": "string"
96
+ },
97
+ "sortDirection": {
98
+ "type": "string",
99
+ "enum": [
100
+ "asc",
101
+ "desc"
102
+ ]
103
+ },
104
+ "applicationId": {
105
+ "type": "string",
106
+ "pattern": "^[A-Fa-f\\d]{24}$"
107
+ }
108
+ }
109
+ }
@@ -201,36 +201,137 @@
201
201
  "contextConfiguration": {
202
202
  "type": "array",
203
203
  "items": {
204
- "type": "object",
205
- "properties": {
206
- "name": {
207
- "type": "string",
208
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
209
- },
210
- "type": {
211
- "type": "string",
212
- "enum": [
213
- "deviceAttribute",
214
- "deviceId",
215
- "deviceTag",
216
- "number",
217
- "string"
204
+ "oneOf": [
205
+ {
206
+ "type": "object",
207
+ "properties": {
208
+ "name": {
209
+ "type": "string",
210
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
211
+ },
212
+ "type": {
213
+ "type": "string",
214
+ "enum": [
215
+ "deviceAttribute"
216
+ ]
217
+ },
218
+ "applicationId": {
219
+ "type": "string",
220
+ "pattern": "^[A-Fa-f\\d]{24}$"
221
+ },
222
+ "defaultValue": {
223
+ "type": "string",
224
+ "maxLength": 32767
225
+ },
226
+ "validationEnabled": {
227
+ "type": "boolean"
228
+ },
229
+ "validationConfig": {
230
+ "type": "object",
231
+ "properties": {
232
+ "attributes": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "string",
236
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
237
+ },
238
+ "maxItems": 100
239
+ }
240
+ },
241
+ "additionalProperties": false
242
+ }
243
+ },
244
+ "required": [
245
+ "name",
246
+ "type",
247
+ "defaultValue"
218
248
  ]
219
249
  },
220
- "applicationId": {
221
- "type": "string",
222
- "pattern": "^[A-Fa-f\\d]{24}$"
223
- },
224
- "defaultValue": {
225
- "oneOf": [
226
- {
250
+ {
251
+ "type": "object",
252
+ "properties": {
253
+ "name": {
254
+ "type": "string",
255
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
256
+ },
257
+ "type": {
258
+ "type": "string",
259
+ "enum": [
260
+ "deviceId"
261
+ ]
262
+ },
263
+ "applicationId": {
264
+ "type": "string",
265
+ "pattern": "^[A-Fa-f\\d]{24}$"
266
+ },
267
+ "defaultValue": {
227
268
  "type": "string",
228
269
  "maxLength": 32767
229
270
  },
230
- {
231
- "type": "number"
271
+ "validationEnabled": {
272
+ "type": "boolean"
273
+ },
274
+ "validationConfig": {
275
+ "type": "object",
276
+ "properties": {
277
+ "deviceIds": {
278
+ "type": "array",
279
+ "items": {
280
+ "type": "string",
281
+ "pattern": "^[A-Fa-f\\d]{24}$"
282
+ },
283
+ "maxItems": 1000
284
+ },
285
+ "deviceTags": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "object",
289
+ "properties": {
290
+ "key": {
291
+ "type": "string",
292
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
293
+ },
294
+ "value": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 255
298
+ }
299
+ },
300
+ "additionalProperties": false
301
+ },
302
+ "maxItems": 100
303
+ },
304
+ "includeFullDevice": {
305
+ "type": "boolean"
306
+ }
307
+ },
308
+ "additionalProperties": false
309
+ }
310
+ },
311
+ "required": [
312
+ "name",
313
+ "type",
314
+ "defaultValue"
315
+ ]
316
+ },
317
+ {
318
+ "type": "object",
319
+ "properties": {
320
+ "name": {
321
+ "type": "string",
322
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
323
+ },
324
+ "type": {
325
+ "type": "string",
326
+ "enum": [
327
+ "deviceTag"
328
+ ]
329
+ },
330
+ "applicationId": {
331
+ "type": "string",
332
+ "pattern": "^[A-Fa-f\\d]{24}$"
232
333
  },
233
- {
334
+ "defaultValue": {
234
335
  "type": "object",
235
336
  "properties": {
236
337
  "key": {
@@ -244,73 +345,174 @@
244
345
  }
245
346
  },
246
347
  "additionalProperties": false
348
+ },
349
+ "validationEnabled": {
350
+ "type": "boolean"
351
+ },
352
+ "validationConfig": {
353
+ "type": "object",
354
+ "properties": {
355
+ "deviceTags": {
356
+ "type": "array",
357
+ "items": {
358
+ "type": "object",
359
+ "properties": {
360
+ "key": {
361
+ "type": "string",
362
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
363
+ },
364
+ "value": {
365
+ "type": "string",
366
+ "minLength": 1,
367
+ "maxLength": 255
368
+ }
369
+ },
370
+ "additionalProperties": false
371
+ },
372
+ "maxItems": 100
373
+ }
374
+ },
375
+ "additionalProperties": false
247
376
  }
377
+ },
378
+ "required": [
379
+ "name",
380
+ "type",
381
+ "defaultValue"
248
382
  ]
249
383
  },
250
- "validationEnabled": {
251
- "type": "boolean"
252
- },
253
- "validationConfig": {
384
+ {
254
385
  "type": "object",
255
386
  "properties": {
256
- "min": {
257
- "type": "number"
387
+ "name": {
388
+ "type": "string",
389
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
258
390
  },
259
- "max": {
260
- "type": "number"
391
+ "type": {
392
+ "type": "string",
393
+ "enum": [
394
+ "number"
395
+ ]
261
396
  },
262
- "regExp": {
397
+ "applicationId": {
263
398
  "type": "string",
264
- "maxLength": 1024
399
+ "pattern": "^[A-Fa-f\\d]{24}$"
265
400
  },
266
- "attributes": {
267
- "type": "array",
268
- "items": {
269
- "type": "string",
270
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
401
+ "defaultValue": {
402
+ "type": [
403
+ "number",
404
+ "string"
405
+ ]
406
+ },
407
+ "validationEnabled": {
408
+ "type": "boolean"
409
+ },
410
+ "validationConfig": {
411
+ "type": "object",
412
+ "properties": {
413
+ "min": {
414
+ "type": "number"
415
+ },
416
+ "max": {
417
+ "type": "number"
418
+ }
271
419
  },
272
- "maxItems": 100
420
+ "additionalProperties": false
421
+ }
422
+ },
423
+ "required": [
424
+ "name",
425
+ "type",
426
+ "defaultValue"
427
+ ]
428
+ },
429
+ {
430
+ "type": "object",
431
+ "properties": {
432
+ "name": {
433
+ "type": "string",
434
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
435
+ },
436
+ "type": {
437
+ "type": "string",
438
+ "enum": [
439
+ "string"
440
+ ]
273
441
  },
274
- "deviceIds": {
275
- "type": "array",
276
- "items": {
277
- "type": "string",
278
- "pattern": "^[A-Fa-f\\d]{24}$"
442
+ "applicationId": {
443
+ "type": "string",
444
+ "pattern": "^[A-Fa-f\\d]{24}$"
445
+ },
446
+ "defaultValue": {
447
+ "type": "string",
448
+ "maxLength": 32767
449
+ },
450
+ "validationEnabled": {
451
+ "type": "boolean"
452
+ },
453
+ "validationConfig": {
454
+ "type": "object",
455
+ "properties": {
456
+ "regExp": {
457
+ "type": "string",
458
+ "maxLength": 1024
459
+ }
279
460
  },
280
- "maxItems": 1000
461
+ "additionalProperties": false
462
+ }
463
+ },
464
+ "required": [
465
+ "name",
466
+ "type",
467
+ "defaultValue"
468
+ ]
469
+ },
470
+ {
471
+ "type": "object",
472
+ "properties": {
473
+ "name": {
474
+ "type": "string",
475
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
476
+ },
477
+ "type": {
478
+ "type": "string",
479
+ "enum": [
480
+ "experienceUser"
481
+ ]
482
+ },
483
+ "applicationId": {
484
+ "type": "string",
485
+ "pattern": "^[A-Fa-f\\d]{24}$"
486
+ },
487
+ "defaultValue": {
488
+ "type": "string",
489
+ "maxLength": 32767
490
+ },
491
+ "validationEnabled": {
492
+ "type": "boolean"
281
493
  },
282
- "deviceTags": {
283
- "type": "array",
284
- "items": {
285
- "type": "object",
286
- "properties": {
287
- "key": {
494
+ "validationConfig": {
495
+ "type": "object",
496
+ "properties": {
497
+ "experienceGroupIds": {
498
+ "type": "array",
499
+ "items": {
288
500
  "type": "string",
289
- "pattern": "^[0-9a-zA-Z_-]{1,255}$"
501
+ "pattern": "^[A-Fa-f\\d]{24}$"
290
502
  },
291
- "value": {
292
- "type": "string",
293
- "minLength": 1,
294
- "maxLength": 255
295
- }
296
- },
297
- "additionalProperties": false
503
+ "maxItems": 1000
504
+ }
298
505
  },
299
- "maxItems": 100
300
- },
301
- "includeFullDevice": {
302
- "type": "boolean"
506
+ "additionalProperties": false
303
507
  }
304
508
  },
305
- "additionalProperties": false
509
+ "required": [
510
+ "name",
511
+ "type",
512
+ "defaultValue"
513
+ ]
306
514
  }
307
- },
308
- "required": [
309
- "name",
310
- "type",
311
- "defaultValue"
312
- ],
313
- "additionalProperties": false
515
+ ]
314
516
  },
315
517
  "maxItems": 100
316
518
  }