losant_rest 1.20.1 → 1.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +140 -14
  3. data/docs/_schemas.md +3150 -646
  4. data/docs/application.md +1 -0
  5. data/docs/devices.md +45 -2
  6. data/docs/instance.md +41 -0
  7. data/docs/instanceNotificationRule.md +219 -0
  8. data/docs/instanceNotificationRules.md +91 -0
  9. data/docs/instanceOrg.md +49 -5
  10. data/docs/instanceSandbox.md +179 -3
  11. data/docs/me.md +1 -0
  12. data/docs/org.md +1 -0
  13. data/lib/platform_rest/application.rb +2 -0
  14. data/lib/platform_rest/client.rb +10 -2
  15. data/lib/platform_rest/devices.rb +52 -2
  16. data/lib/platform_rest/instance.rb +50 -0
  17. data/lib/platform_rest/instance_notification_rule.rb +275 -0
  18. data/lib/platform_rest/instance_notification_rules.rb +136 -0
  19. data/lib/platform_rest/instance_org.rb +57 -5
  20. data/lib/platform_rest/instance_sandbox.rb +211 -3
  21. data/lib/platform_rest/me.rb +2 -0
  22. data/lib/platform_rest/org.rb +2 -0
  23. data/lib/platform_rest/version.rb +1 -1
  24. data/lib/platform_rest.rb +2 -0
  25. data/schemas/advancedDeviceQuery.json +103 -0
  26. data/schemas/apiTokenPost.json +16 -0
  27. data/schemas/applicationSearchResult.json +46 -6
  28. data/schemas/bulkRestoreResponse.json +12 -0
  29. data/schemas/credentialLinkedResources.json +12 -0
  30. data/schemas/dataExport.json +103 -0
  31. data/schemas/device.json +4 -0
  32. data/schemas/devices.json +4 -0
  33. data/schemas/devicesDeleteOrRestorePost.json +2061 -0
  34. data/schemas/devicesExportPayloadCountPost.json +103 -0
  35. data/schemas/devicesExportPost.json +103 -0
  36. data/schemas/devicesPatch.json +103 -0
  37. data/schemas/devicesRemoveDataPost.json +103 -0
  38. data/schemas/experienceEndpoint.json +6 -1
  39. data/schemas/experienceEndpointPatch.json +6 -1
  40. data/schemas/experienceEndpointPost.json +6 -1
  41. data/schemas/experienceEndpoints.json +6 -1
  42. data/schemas/experienceLinkedResources.json +18 -1
  43. data/schemas/flow.json +4 -0
  44. data/schemas/flowPatch.json +4 -0
  45. data/schemas/flowPost.json +4 -0
  46. data/schemas/flowVersion.json +8 -0
  47. data/schemas/flowVersionPost.json +4 -0
  48. data/schemas/flowVersions.json +8 -0
  49. data/schemas/flows.json +4 -0
  50. data/schemas/flowsImportPost.json +8 -0
  51. data/schemas/flowsImportResult.json +12 -0
  52. data/schemas/githubLogin.json +16 -0
  53. data/schemas/instance.json +9 -0
  54. data/schemas/instanceAuditLog.json +2 -1
  55. data/schemas/instanceAuditLogFilter.json +2 -1
  56. data/schemas/instanceOrg.json +4 -0
  57. data/schemas/instanceOrgs.json +4 -0
  58. data/schemas/instances.json +9 -0
  59. data/schemas/lastValueQuery.json +103 -0
  60. data/schemas/multiDeviceCommand.json +103 -0
  61. data/schemas/notificationRule.json +161 -0
  62. data/schemas/notificationRuleDeliveryLogs.json +123 -0
  63. data/schemas/notificationRuleEvaluationOptions.json +10 -0
  64. data/schemas/notificationRulePatch.json +128 -0
  65. data/schemas/notificationRulePost.json +140 -0
  66. data/schemas/notificationRules.json +212 -0
  67. data/schemas/samlResponse.json +16 -0
  68. data/schemas/timeSeriesQuery.json +103 -0
  69. data/schemas/userCredentials.json +16 -0
  70. data/schemas/userPost.json +16 -0
  71. metadata +14 -2
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "targetQueryJson": {
6
+ "type": "string",
7
+ "maxLength": 8192
8
+ },
9
+ "name": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 255
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "maxLength": 32767
17
+ },
18
+ "enabled": {
19
+ "type": "boolean"
20
+ },
21
+ "callbackUrl": {
22
+ "oneOf": [
23
+ {
24
+ "type": "string",
25
+ "format": "uri",
26
+ "maxLength": 1024
27
+ },
28
+ {
29
+ "type": "null"
30
+ },
31
+ {
32
+ "type": "string",
33
+ "enum": [
34
+ ""
35
+ ]
36
+ }
37
+ ]
38
+ },
39
+ "emailConfig": {
40
+ "oneOf": [
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "subjectTemplate": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 1024
48
+ },
49
+ "bodyTemplate": {
50
+ "type": "string",
51
+ "maxLength": 32767
52
+ },
53
+ "sendToTarget": {
54
+ "type": "string",
55
+ "enum": [
56
+ "admins",
57
+ "members",
58
+ "none"
59
+ ]
60
+ },
61
+ "sendToOwner": {
62
+ "type": "string",
63
+ "enum": [
64
+ "admins",
65
+ "members",
66
+ "none"
67
+ ]
68
+ },
69
+ "sendToAddresses": {
70
+ "type": "array",
71
+ "maxItems": 10,
72
+ "items": {
73
+ "type": "string",
74
+ "format": "email",
75
+ "maxLength": 1024
76
+ }
77
+ }
78
+ },
79
+ "required": [
80
+ "subjectTemplate",
81
+ "bodyTemplate"
82
+ ],
83
+ "additionalProperties": false
84
+ },
85
+ {
86
+ "type": "null"
87
+ }
88
+ ]
89
+ },
90
+ "ruleConfig": {
91
+ "type": "object",
92
+ "properties": {
93
+ "ruleType": {
94
+ "type": "string",
95
+ "enum": [
96
+ "payloadUsage",
97
+ "notebookMinuteUsage"
98
+ ]
99
+ },
100
+ "thresholdType": {
101
+ "type": "string",
102
+ "enum": [
103
+ "percentOfLimit"
104
+ ]
105
+ },
106
+ "threshold": {
107
+ "type": "number",
108
+ "minimum": 0,
109
+ "maximum": 1000
110
+ },
111
+ "maxFrequency": {
112
+ "type": "string",
113
+ "enum": [
114
+ "billingCycle",
115
+ "daily"
116
+ ]
117
+ }
118
+ },
119
+ "required": [
120
+ "ruleType",
121
+ "thresholdType",
122
+ "threshold"
123
+ ],
124
+ "additionalProperties": false
125
+ }
126
+ },
127
+ "additionalProperties": false
128
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "targetType": {
6
+ "type": "string",
7
+ "enum": [
8
+ "organization"
9
+ ]
10
+ },
11
+ "targetQueryJson": {
12
+ "type": "string",
13
+ "maxLength": 8192
14
+ },
15
+ "name": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 255
19
+ },
20
+ "description": {
21
+ "type": "string",
22
+ "maxLength": 32767
23
+ },
24
+ "enabled": {
25
+ "type": "boolean"
26
+ },
27
+ "callbackUrl": {
28
+ "oneOf": [
29
+ {
30
+ "type": "string",
31
+ "format": "uri",
32
+ "maxLength": 1024
33
+ },
34
+ {
35
+ "type": "null"
36
+ },
37
+ {
38
+ "type": "string",
39
+ "enum": [
40
+ ""
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ "emailConfig": {
46
+ "oneOf": [
47
+ {
48
+ "type": "object",
49
+ "properties": {
50
+ "subjectTemplate": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 1024
54
+ },
55
+ "bodyTemplate": {
56
+ "type": "string",
57
+ "maxLength": 32767
58
+ },
59
+ "sendToTarget": {
60
+ "type": "string",
61
+ "enum": [
62
+ "admins",
63
+ "members",
64
+ "none"
65
+ ]
66
+ },
67
+ "sendToOwner": {
68
+ "type": "string",
69
+ "enum": [
70
+ "admins",
71
+ "members",
72
+ "none"
73
+ ]
74
+ },
75
+ "sendToAddresses": {
76
+ "type": "array",
77
+ "maxItems": 10,
78
+ "items": {
79
+ "type": "string",
80
+ "format": "email",
81
+ "maxLength": 1024
82
+ }
83
+ }
84
+ },
85
+ "required": [
86
+ "subjectTemplate",
87
+ "bodyTemplate"
88
+ ],
89
+ "additionalProperties": false
90
+ },
91
+ {
92
+ "type": "null"
93
+ }
94
+ ]
95
+ },
96
+ "ruleConfig": {
97
+ "type": "object",
98
+ "properties": {
99
+ "ruleType": {
100
+ "type": "string",
101
+ "enum": [
102
+ "payloadUsage",
103
+ "notebookMinuteUsage"
104
+ ]
105
+ },
106
+ "thresholdType": {
107
+ "type": "string",
108
+ "enum": [
109
+ "percentOfLimit"
110
+ ]
111
+ },
112
+ "threshold": {
113
+ "type": "number",
114
+ "minimum": 0,
115
+ "maximum": 1000
116
+ },
117
+ "maxFrequency": {
118
+ "type": "string",
119
+ "enum": [
120
+ "billingCycle",
121
+ "daily"
122
+ ]
123
+ }
124
+ },
125
+ "required": [
126
+ "ruleType",
127
+ "thresholdType",
128
+ "threshold"
129
+ ],
130
+ "additionalProperties": false
131
+ }
132
+ },
133
+ "additionalProperties": false,
134
+ "required": [
135
+ "targetType",
136
+ "targetQueryJson",
137
+ "name",
138
+ "ruleConfig"
139
+ ]
140
+ }
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Notification Rule",
9
+ "description": "Schema for a single notification rule",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "notificationRuleId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "ownerId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Fa-f\\d]{24}$"
23
+ },
24
+ "ownerType": {
25
+ "type": "string",
26
+ "enum": [
27
+ "instance"
28
+ ]
29
+ },
30
+ "creationDate": {
31
+ "type": "string",
32
+ "format": "date-time"
33
+ },
34
+ "lastUpdated": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ },
38
+ "createdById": {
39
+ "type": "string",
40
+ "pattern": "^[A-Fa-f\\d]{24}$"
41
+ },
42
+ "createdByType": {
43
+ "type": "string",
44
+ "enum": [
45
+ "apiToken",
46
+ "user"
47
+ ]
48
+ },
49
+ "lastUpdatedById": {
50
+ "type": "string",
51
+ "pattern": "^[A-Fa-f\\d]{24}$"
52
+ },
53
+ "lastUpdatedByType": {
54
+ "type": "string",
55
+ "enum": [
56
+ "apiToken",
57
+ "user"
58
+ ]
59
+ },
60
+ "targetType": {
61
+ "type": "string",
62
+ "enum": [
63
+ "organization"
64
+ ]
65
+ },
66
+ "targetQueryJson": {
67
+ "type": "string",
68
+ "maxLength": 8192
69
+ },
70
+ "name": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 255
74
+ },
75
+ "description": {
76
+ "type": "string",
77
+ "maxLength": 32767
78
+ },
79
+ "enabled": {
80
+ "type": "boolean"
81
+ },
82
+ "callbackUrl": {
83
+ "type": "string",
84
+ "format": "uri",
85
+ "maxLength": 1024
86
+ },
87
+ "emailConfig": {
88
+ "type": "object",
89
+ "properties": {
90
+ "subjectTemplate": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 1024
94
+ },
95
+ "bodyTemplate": {
96
+ "type": "string",
97
+ "maxLength": 32767
98
+ },
99
+ "sendToTarget": {
100
+ "type": "string",
101
+ "enum": [
102
+ "admins",
103
+ "members",
104
+ "none"
105
+ ]
106
+ },
107
+ "sendToOwner": {
108
+ "type": "string",
109
+ "enum": [
110
+ "admins",
111
+ "members",
112
+ "none"
113
+ ]
114
+ },
115
+ "sendToAddresses": {
116
+ "type": "array",
117
+ "maxItems": 10,
118
+ "items": {
119
+ "type": "string",
120
+ "format": "email",
121
+ "maxLength": 1024
122
+ }
123
+ }
124
+ },
125
+ "required": [
126
+ "subjectTemplate",
127
+ "bodyTemplate"
128
+ ],
129
+ "additionalProperties": false
130
+ },
131
+ "ruleConfig": {
132
+ "type": "object",
133
+ "properties": {
134
+ "ruleType": {
135
+ "type": "string",
136
+ "enum": [
137
+ "payloadUsage",
138
+ "notebookMinuteUsage"
139
+ ]
140
+ },
141
+ "thresholdType": {
142
+ "type": "string",
143
+ "enum": [
144
+ "percentOfLimit"
145
+ ]
146
+ },
147
+ "threshold": {
148
+ "type": "number",
149
+ "minimum": 0,
150
+ "maximum": 1000
151
+ },
152
+ "maxFrequency": {
153
+ "type": "string",
154
+ "enum": [
155
+ "billingCycle",
156
+ "daily"
157
+ ]
158
+ }
159
+ },
160
+ "required": [
161
+ "ruleType",
162
+ "thresholdType",
163
+ "threshold"
164
+ ],
165
+ "additionalProperties": false
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "count": {
171
+ "type": "integer"
172
+ },
173
+ "totalCount": {
174
+ "type": "integer"
175
+ },
176
+ "perPage": {
177
+ "type": "integer"
178
+ },
179
+ "page": {
180
+ "type": "integer"
181
+ },
182
+ "filter": {
183
+ "type": "string"
184
+ },
185
+ "filterField": {
186
+ "type": "string"
187
+ },
188
+ "sortField": {
189
+ "type": "string"
190
+ },
191
+ "sortDirection": {
192
+ "type": "string",
193
+ "enum": [
194
+ "asc",
195
+ "desc",
196
+ "ASC",
197
+ "DESC",
198
+ ""
199
+ ]
200
+ },
201
+ "ownerId": {
202
+ "type": "string",
203
+ "pattern": "^[A-Fa-f\\d]{24}$"
204
+ },
205
+ "ownerType": {
206
+ "type": "string",
207
+ "enum": [
208
+ "instance"
209
+ ]
210
+ }
211
+ }
212
+ }
@@ -182,6 +182,7 @@
182
182
  "devices.attributeNames",
183
183
  "devices.patch",
184
184
  "devices.delete",
185
+ "devices.restore",
185
186
  "devices.removeData",
186
187
  "devices.detailedSummary",
187
188
  "devices.deviceNames",
@@ -376,6 +377,7 @@
376
377
  "instance.patch",
377
378
  "instance.historicalSummaries",
378
379
  "instance.generateReport",
380
+ "instance.payloadCounts",
379
381
  "instance.payloadCountsBreakdown",
380
382
  "instance.deviceCounts",
381
383
  "instance.notebookMinuteCounts",
@@ -383,6 +385,7 @@
383
385
  "instanceOrg.get",
384
386
  "instanceOrg.patch",
385
387
  "instanceOrg.delete",
388
+ "instanceOrg.payloadCounts",
386
389
  "instanceOrg.payloadCountsBreakdown",
387
390
  "instanceOrg.deviceCounts",
388
391
  "instanceOrg.notebookMinuteCounts",
@@ -427,10 +430,23 @@
427
430
  "instanceCustomNode.delete",
428
431
  "instanceCustomNode.errors",
429
432
  "instanceCustomNode.stats",
433
+ "instanceNotificationRules.*",
434
+ "instanceNotificationRules.get",
435
+ "instanceNotificationRules.post",
436
+ "instanceNotificationRule.*",
437
+ "instanceNotificationRule.get",
438
+ "instanceNotificationRule.patch",
439
+ "instanceNotificationRule.delete",
440
+ "instanceNotificationRule.evaluate",
441
+ "instanceNotificationRule.logs",
430
442
  "instanceSandbox.*",
431
443
  "instanceSandbox.get",
432
444
  "instanceSandbox.delete",
433
445
  "instanceSandbox.undelete",
446
+ "instanceSandbox.payloadCounts",
447
+ "instanceSandbox.payloadCountsBreakdown",
448
+ "instanceSandbox.deviceCounts",
449
+ "instanceSandbox.notebookMinuteCounts",
434
450
  "instanceSandboxes.*",
435
451
  "instanceSandboxes.get",
436
452
  "instanceAuditLog.*",
@@ -489,6 +489,109 @@
489
489
  }
490
490
  ]
491
491
  },
492
+ "deletedAt": {
493
+ "oneOf": [
494
+ {
495
+ "type": [
496
+ "string",
497
+ "number",
498
+ "boolean",
499
+ "null"
500
+ ]
501
+ },
502
+ {
503
+ "type": "object",
504
+ "properties": {
505
+ "$eq": {
506
+ "type": [
507
+ "string",
508
+ "number",
509
+ "boolean",
510
+ "null"
511
+ ]
512
+ },
513
+ "$ne": {
514
+ "type": [
515
+ "string",
516
+ "number",
517
+ "boolean",
518
+ "null"
519
+ ]
520
+ },
521
+ "$gt": {
522
+ "type": [
523
+ "string",
524
+ "number",
525
+ "boolean",
526
+ "null"
527
+ ]
528
+ },
529
+ "$lt": {
530
+ "type": [
531
+ "string",
532
+ "number",
533
+ "boolean",
534
+ "null"
535
+ ]
536
+ },
537
+ "$gte": {
538
+ "type": [
539
+ "string",
540
+ "number",
541
+ "boolean",
542
+ "null"
543
+ ]
544
+ },
545
+ "$lte": {
546
+ "type": [
547
+ "string",
548
+ "number",
549
+ "boolean",
550
+ "null"
551
+ ]
552
+ },
553
+ "$startsWith": {
554
+ "type": "string",
555
+ "minLength": 1
556
+ },
557
+ "$endsWith": {
558
+ "type": "string",
559
+ "minLength": 1
560
+ },
561
+ "$contains": {
562
+ "type": "string",
563
+ "minLength": 1
564
+ },
565
+ "$ci": {
566
+ "type": "boolean"
567
+ },
568
+ "$in": {
569
+ "type": "array",
570
+ "maxItems": 100,
571
+ "items": {
572
+ "type": [
573
+ "string",
574
+ "number",
575
+ "boolean"
576
+ ]
577
+ }
578
+ },
579
+ "$nin": {
580
+ "type": "array",
581
+ "maxItems": 100,
582
+ "items": {
583
+ "type": [
584
+ "string",
585
+ "number",
586
+ "boolean"
587
+ ]
588
+ }
589
+ }
590
+ },
591
+ "additionalProperties": false
592
+ }
593
+ ]
594
+ },
492
595
  "name": {
493
596
  "oneOf": [
494
597
  {
@@ -186,6 +186,7 @@
186
186
  "devices.attributeNames",
187
187
  "devices.patch",
188
188
  "devices.delete",
189
+ "devices.restore",
189
190
  "devices.removeData",
190
191
  "devices.detailedSummary",
191
192
  "devices.deviceNames",
@@ -380,6 +381,7 @@
380
381
  "instance.patch",
381
382
  "instance.historicalSummaries",
382
383
  "instance.generateReport",
384
+ "instance.payloadCounts",
383
385
  "instance.payloadCountsBreakdown",
384
386
  "instance.deviceCounts",
385
387
  "instance.notebookMinuteCounts",
@@ -387,6 +389,7 @@
387
389
  "instanceOrg.get",
388
390
  "instanceOrg.patch",
389
391
  "instanceOrg.delete",
392
+ "instanceOrg.payloadCounts",
390
393
  "instanceOrg.payloadCountsBreakdown",
391
394
  "instanceOrg.deviceCounts",
392
395
  "instanceOrg.notebookMinuteCounts",
@@ -431,10 +434,23 @@
431
434
  "instanceCustomNode.delete",
432
435
  "instanceCustomNode.errors",
433
436
  "instanceCustomNode.stats",
437
+ "instanceNotificationRules.*",
438
+ "instanceNotificationRules.get",
439
+ "instanceNotificationRules.post",
440
+ "instanceNotificationRule.*",
441
+ "instanceNotificationRule.get",
442
+ "instanceNotificationRule.patch",
443
+ "instanceNotificationRule.delete",
444
+ "instanceNotificationRule.evaluate",
445
+ "instanceNotificationRule.logs",
434
446
  "instanceSandbox.*",
435
447
  "instanceSandbox.get",
436
448
  "instanceSandbox.delete",
437
449
  "instanceSandbox.undelete",
450
+ "instanceSandbox.payloadCounts",
451
+ "instanceSandbox.payloadCountsBreakdown",
452
+ "instanceSandbox.deviceCounts",
453
+ "instanceSandbox.notebookMinuteCounts",
438
454
  "instanceSandboxes.*",
439
455
  "instanceSandboxes.get",
440
456
  "instanceAuditLog.*",