losant_rest 1.18.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +10703 -1558
  3. data/docs/credential.md +175 -0
  4. data/docs/credentials.md +93 -0
  5. data/lib/losant_rest/client.rb +10 -2
  6. data/lib/losant_rest/credential.rb +224 -0
  7. data/lib/losant_rest/credentials.rb +138 -0
  8. data/lib/losant_rest/version.rb +1 -1
  9. data/lib/losant_rest.rb +2 -0
  10. data/schemas/apiTokenPost.json +8 -0
  11. data/schemas/application.json +9 -8
  12. data/schemas/applicationCreationByTemplateResult.json +9 -8
  13. data/schemas/applicationPatch.json +6 -8
  14. data/schemas/applicationPost.json +6 -8
  15. data/schemas/applications.json +9 -8
  16. data/schemas/credential.json +115 -0
  17. data/schemas/credentialLinkedResources.json +8254 -0
  18. data/schemas/credentialPatch.json +66 -0
  19. data/schemas/credentialPost.json +89 -0
  20. data/schemas/credentials.json +160 -0
  21. data/schemas/dashboardPatch.json +10 -3
  22. data/schemas/dashboardPost.json +10 -3
  23. data/schemas/device.json +8 -0
  24. data/schemas/devices.json +8 -0
  25. data/schemas/experienceGroup.json +8 -0
  26. data/schemas/experienceGroups.json +8 -0
  27. data/schemas/experienceLinkedResources.json +6 -3
  28. data/schemas/flow.json +2 -1
  29. data/schemas/flowPatch.json +2 -1
  30. data/schemas/flowPost.json +2 -1
  31. data/schemas/flowVersion.json +4 -2
  32. data/schemas/flowVersionPost.json +2 -1
  33. data/schemas/flowVersions.json +4 -2
  34. data/schemas/flows.json +2 -1
  35. data/schemas/flowsImportPost.json +4 -2
  36. data/schemas/flowsImportResult.json +6 -3
  37. data/schemas/githubLogin.json +8 -0
  38. data/schemas/historicalSummaries.json +4 -0
  39. data/schemas/historicalSummary.json +4 -0
  40. data/schemas/instance.json +7 -0
  41. data/schemas/instanceOrg.json +4 -0
  42. data/schemas/instanceOrgPatch.json +4 -0
  43. data/schemas/instanceOrgPost.json +4 -0
  44. data/schemas/instanceOrgs.json +4 -0
  45. data/schemas/instancePatch.json +4 -0
  46. data/schemas/instanceSandbox.json +6 -0
  47. data/schemas/instanceSandboxes.json +6 -0
  48. data/schemas/instances.json +7 -0
  49. data/schemas/integration.json +26 -12
  50. data/schemas/integrationPatch.json +33 -12
  51. data/schemas/integrationPost.json +26 -12
  52. data/schemas/integrations.json +26 -12
  53. data/schemas/me.json +6 -0
  54. data/schemas/org.json +7 -0
  55. data/schemas/orgs.json +7 -0
  56. data/schemas/samlResponse.json +8 -0
  57. data/schemas/userCredentials.json +8 -0
  58. data/schemas/userPost.json +8 -0
  59. metadata +11 -2
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "enabled": {
15
+ "type": "boolean"
16
+ },
17
+ "awsConfig": {
18
+ "type": "object",
19
+ "properties": {
20
+ "accessKeyId": {
21
+ "type": "string",
22
+ "minLength": 16,
23
+ "maxLength": 128
24
+ },
25
+ "secretAccessKey": {
26
+ "type": "string",
27
+ "minLength": 4,
28
+ "maxLength": 128
29
+ },
30
+ "region": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 128
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "azureConfig": {
39
+ "type": "object",
40
+ "properties": {
41
+ "account": {
42
+ "type": "string",
43
+ "maxLength": 128
44
+ },
45
+ "accountKey": {
46
+ "type": "string",
47
+ "minLength": 4,
48
+ "maxLength": 128
49
+ }
50
+ },
51
+ "additionalProperties": false
52
+ },
53
+ "gcpConfig": {
54
+ "type": "object",
55
+ "properties": {
56
+ "keyJson": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 8192
60
+ }
61
+ },
62
+ "additionalProperties": false
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "enabled": {
15
+ "type": "boolean"
16
+ },
17
+ "type": {
18
+ "type": "string",
19
+ "enum": [
20
+ "aws",
21
+ "azure",
22
+ "gcp"
23
+ ]
24
+ },
25
+ "awsConfig": {
26
+ "type": "object",
27
+ "properties": {
28
+ "accessKeyId": {
29
+ "type": "string",
30
+ "minLength": 16,
31
+ "maxLength": 128
32
+ },
33
+ "secretAccessKey": {
34
+ "type": "string",
35
+ "minLength": 4,
36
+ "maxLength": 128
37
+ },
38
+ "region": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 128
42
+ }
43
+ },
44
+ "additionalProperties": false,
45
+ "required": [
46
+ "accessKeyId",
47
+ "secretAccessKey",
48
+ "region"
49
+ ]
50
+ },
51
+ "azureConfig": {
52
+ "type": "object",
53
+ "properties": {
54
+ "account": {
55
+ "type": "string",
56
+ "maxLength": 128
57
+ },
58
+ "accountKey": {
59
+ "type": "string",
60
+ "minLength": 4,
61
+ "maxLength": 128
62
+ }
63
+ },
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "accountKey"
67
+ ]
68
+ },
69
+ "gcpConfig": {
70
+ "type": "object",
71
+ "properties": {
72
+ "keyJson": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "maxLength": 8192
76
+ }
77
+ },
78
+ "additionalProperties": false,
79
+ "required": [
80
+ "keyJson"
81
+ ]
82
+ }
83
+ },
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "name",
87
+ "type"
88
+ ]
89
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Credential",
9
+ "description": "Schema for a single Credential",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "applicationId": {
17
+ "type": "string",
18
+ "pattern": "^[A-Fa-f\\d]{24}$"
19
+ },
20
+ "creationDate": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "lastUpdated": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "createdById": {
29
+ "type": "string",
30
+ "pattern": "^[A-Fa-f\\d]{24}$"
31
+ },
32
+ "createdByType": {
33
+ "type": "string",
34
+ "enum": [
35
+ "flow",
36
+ "user",
37
+ "apiToken"
38
+ ]
39
+ },
40
+ "lastUpdatedById": {
41
+ "type": "string",
42
+ "pattern": "^[A-Fa-f\\d]{24}$"
43
+ },
44
+ "lastUpdatedByType": {
45
+ "type": "string",
46
+ "enum": [
47
+ "flow",
48
+ "user",
49
+ "apiToken"
50
+ ]
51
+ },
52
+ "name": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 255
56
+ },
57
+ "description": {
58
+ "type": "string",
59
+ "maxLength": 32767
60
+ },
61
+ "enabled": {
62
+ "type": "boolean"
63
+ },
64
+ "type": {
65
+ "type": "string",
66
+ "enum": [
67
+ "aws",
68
+ "azure",
69
+ "gcp"
70
+ ]
71
+ },
72
+ "awsConfig": {
73
+ "type": "object",
74
+ "properties": {
75
+ "accessKeyId": {
76
+ "type": "string",
77
+ "minLength": 16,
78
+ "maxLength": 128
79
+ },
80
+ "region": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 128
84
+ }
85
+ },
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "accessKeyId",
89
+ "region"
90
+ ]
91
+ },
92
+ "azureConfig": {
93
+ "type": "object",
94
+ "properties": {
95
+ "account": {
96
+ "type": "string",
97
+ "maxLength": 128
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ },
102
+ "gcpConfig": {
103
+ "type": "object",
104
+ "properties": {
105
+ "keyMetaJson": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "maxLength": 8192
109
+ }
110
+ },
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "keyMetaJson"
114
+ ]
115
+ }
116
+ },
117
+ "additionalProperties": false,
118
+ "required": [
119
+ "name",
120
+ "type"
121
+ ]
122
+ }
123
+ },
124
+ "count": {
125
+ "type": "integer"
126
+ },
127
+ "totalCount": {
128
+ "type": "integer"
129
+ },
130
+ "perPage": {
131
+ "type": "integer"
132
+ },
133
+ "page": {
134
+ "type": "integer"
135
+ },
136
+ "filter": {
137
+ "type": "string"
138
+ },
139
+ "filterField": {
140
+ "type": "string"
141
+ },
142
+ "sortField": {
143
+ "type": "string"
144
+ },
145
+ "sortDirection": {
146
+ "type": "string",
147
+ "enum": [
148
+ "asc",
149
+ "desc",
150
+ "ASC",
151
+ "DESC",
152
+ ""
153
+ ]
154
+ },
155
+ "applicationId": {
156
+ "type": "string",
157
+ "pattern": "^[A-Fa-f\\d]{24}$"
158
+ }
159
+ }
160
+ }
@@ -5777,9 +5777,16 @@
5777
5777
  "type": "boolean"
5778
5778
  },
5779
5779
  "password": {
5780
- "type": [
5781
- "string",
5782
- "null"
5780
+ "oneOf": [
5781
+ {
5782
+ "type": "string",
5783
+ "minLength": 12,
5784
+ "maxLength": 2048,
5785
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
5786
+ },
5787
+ {
5788
+ "type": "null"
5789
+ }
5783
5790
  ]
5784
5791
  },
5785
5792
  "contextConfiguration": {
@@ -5785,9 +5785,16 @@
5785
5785
  "type": "boolean"
5786
5786
  },
5787
5787
  "password": {
5788
- "type": [
5789
- "string",
5790
- "null"
5788
+ "oneOf": [
5789
+ {
5790
+ "type": "string",
5791
+ "minLength": 12,
5792
+ "maxLength": 2048,
5793
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.*[0-9])(?=.*[a-z]).{12,}$"
5794
+ },
5795
+ {
5796
+ "type": "null"
5797
+ }
5791
5798
  ]
5792
5799
  },
5793
5800
  "contextConfiguration": {
data/schemas/device.json CHANGED
@@ -230,6 +230,14 @@
230
230
  }
231
231
  ]
232
232
  },
233
+ "ancestorIds": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "string",
237
+ "pattern": "^[A-Fa-f\\d]{24}$"
238
+ },
239
+ "maxItems": 1000
240
+ },
233
241
  "systemInterval": {
234
242
  "type": "integer",
235
243
  "minimum": 5,
data/schemas/devices.json CHANGED
@@ -237,6 +237,14 @@
237
237
  }
238
238
  ]
239
239
  },
240
+ "ancestorIds": {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "string",
244
+ "pattern": "^[A-Fa-f\\d]{24}$"
245
+ },
246
+ "maxItems": 1000
247
+ },
240
248
  "systemInterval": {
241
249
  "type": "integer",
242
250
  "minimum": 5,
@@ -103,6 +103,14 @@
103
103
  }
104
104
  ]
105
105
  },
106
+ "ancestorIds": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "string",
110
+ "pattern": "^[A-Fa-f\\d]{24}$"
111
+ },
112
+ "maxItems": 1000
113
+ },
106
114
  "directDeviceCount": {
107
115
  "type": "number"
108
116
  },
@@ -110,6 +110,14 @@
110
110
  }
111
111
  ]
112
112
  },
113
+ "ancestorIds": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string",
117
+ "pattern": "^[A-Fa-f\\d]{24}$"
118
+ },
119
+ "maxItems": 1000
120
+ },
113
121
  "directDeviceCount": {
114
122
  "type": "number"
115
123
  },
@@ -1599,7 +1599,8 @@
1599
1599
  "type": "string",
1600
1600
  "enum": [
1601
1601
  "losant",
1602
- "local"
1602
+ "local",
1603
+ "external"
1603
1604
  ]
1604
1605
  }
1605
1606
  },
@@ -4373,7 +4374,8 @@
4373
4374
  "type": "string",
4374
4375
  "enum": [
4375
4376
  "losant",
4376
- "local"
4377
+ "local",
4378
+ "external"
4377
4379
  ]
4378
4380
  }
4379
4381
  },
@@ -7056,7 +7058,8 @@
7056
7058
  "type": "string",
7057
7059
  "enum": [
7058
7060
  "losant",
7059
- "local"
7061
+ "local",
7062
+ "external"
7060
7063
  ]
7061
7064
  }
7062
7065
  },
data/schemas/flow.json CHANGED
@@ -1218,7 +1218,8 @@
1218
1218
  "type": "string",
1219
1219
  "enum": [
1220
1220
  "losant",
1221
- "local"
1221
+ "local",
1222
+ "external"
1222
1223
  ]
1223
1224
  }
1224
1225
  },
@@ -1175,7 +1175,8 @@
1175
1175
  "type": "string",
1176
1176
  "enum": [
1177
1177
  "losant",
1178
- "local"
1178
+ "local",
1179
+ "external"
1179
1180
  ]
1180
1181
  }
1181
1182
  },
@@ -1164,7 +1164,8 @@
1164
1164
  "type": "string",
1165
1165
  "enum": [
1166
1166
  "losant",
1167
- "local"
1167
+ "local",
1168
+ "external"
1168
1169
  ]
1169
1170
  }
1170
1171
  },
@@ -1193,7 +1193,8 @@
1193
1193
  "type": "string",
1194
1194
  "enum": [
1195
1195
  "losant",
1196
- "local"
1196
+ "local",
1197
+ "external"
1197
1198
  ]
1198
1199
  }
1199
1200
  },
@@ -3876,7 +3877,8 @@
3876
3877
  "type": "string",
3877
3878
  "enum": [
3878
3879
  "losant",
3879
- "local"
3880
+ "local",
3881
+ "external"
3880
3882
  ]
3881
3883
  }
3882
3884
  },
@@ -1133,7 +1133,8 @@
1133
1133
  "type": "string",
1134
1134
  "enum": [
1135
1135
  "losant",
1136
- "local"
1136
+ "local",
1137
+ "external"
1137
1138
  ]
1138
1139
  }
1139
1140
  },
@@ -1200,7 +1200,8 @@
1200
1200
  "type": "string",
1201
1201
  "enum": [
1202
1202
  "losant",
1203
- "local"
1203
+ "local",
1204
+ "external"
1204
1205
  ]
1205
1206
  }
1206
1207
  },
@@ -3883,7 +3884,8 @@
3883
3884
  "type": "string",
3884
3885
  "enum": [
3885
3886
  "losant",
3886
- "local"
3887
+ "local",
3888
+ "external"
3887
3889
  ]
3888
3890
  }
3889
3891
  },
data/schemas/flows.json CHANGED
@@ -1225,7 +1225,8 @@
1225
1225
  "type": "string",
1226
1226
  "enum": [
1227
1227
  "losant",
1228
- "local"
1228
+ "local",
1229
+ "external"
1229
1230
  ]
1230
1231
  }
1231
1232
  },
@@ -1178,7 +1178,8 @@
1178
1178
  "type": "string",
1179
1179
  "enum": [
1180
1180
  "losant",
1181
- "local"
1181
+ "local",
1182
+ "external"
1182
1183
  ]
1183
1184
  }
1184
1185
  },
@@ -3850,7 +3851,8 @@
3850
3851
  "type": "string",
3851
3852
  "enum": [
3852
3853
  "losant",
3853
- "local"
3854
+ "local",
3855
+ "external"
3854
3856
  ]
3855
3857
  }
3856
3858
  },
@@ -1226,7 +1226,8 @@
1226
1226
  "type": "string",
1227
1227
  "enum": [
1228
1228
  "losant",
1229
- "local"
1229
+ "local",
1230
+ "external"
1230
1231
  ]
1231
1232
  }
1232
1233
  },
@@ -3949,7 +3950,8 @@
3949
3950
  "type": "string",
3950
3951
  "enum": [
3951
3952
  "losant",
3952
- "local"
3953
+ "local",
3954
+ "external"
3953
3955
  ]
3954
3956
  }
3955
3957
  },
@@ -6632,7 +6634,8 @@
6632
6634
  "type": "string",
6633
6635
  "enum": [
6634
6636
  "losant",
6635
- "local"
6637
+ "local",
6638
+ "external"
6636
6639
  ]
6637
6640
  }
6638
6641
  },
@@ -33,6 +33,8 @@
33
33
  "applicationDashboard.*",
34
34
  "applicationKey.*",
35
35
  "applicationKeys.*",
36
+ "credential.*",
37
+ "credentials.*",
36
38
  "data.*",
37
39
  "dataTable.*",
38
40
  "dataTables.*",
@@ -122,6 +124,12 @@
122
124
  "applicationKey.patch",
123
125
  "applicationKeys.get",
124
126
  "applicationKeys.post",
127
+ "credential.get",
128
+ "credential.linkedResources",
129
+ "credential.patch",
130
+ "credential.delete",
131
+ "credentials.get",
132
+ "credentials.post",
125
133
  "data.export",
126
134
  "data.lastValueQuery",
127
135
  "data.timeSeriesQuery",
@@ -60,6 +60,10 @@
60
60
  "type": "integer",
61
61
  "minimum": 0
62
62
  },
63
+ "credential": {
64
+ "type": "integer",
65
+ "minimum": 0
66
+ },
63
67
  "dashboard": {
64
68
  "type": "integer",
65
69
  "minimum": 0
@@ -53,6 +53,10 @@
53
53
  "type": "integer",
54
54
  "minimum": 0
55
55
  },
56
+ "credential": {
57
+ "type": "integer",
58
+ "minimum": 0
59
+ },
56
60
  "dashboard": {
57
61
  "type": "integer",
58
62
  "minimum": 0
@@ -108,6 +108,9 @@
108
108
  "applicationkey": {
109
109
  "type": "integer"
110
110
  },
111
+ "credential": {
112
+ "type": "integer"
113
+ },
111
114
  "dashboard": {
112
115
  "type": "integer"
113
116
  },
@@ -207,6 +210,10 @@
207
210
  "type": "integer",
208
211
  "minimum": 0
209
212
  },
213
+ "credential": {
214
+ "type": "integer",
215
+ "minimum": 0
216
+ },
210
217
  "dashboard": {
211
218
  "type": "integer",
212
219
  "minimum": 0
@@ -46,6 +46,10 @@
46
46
  "type": "integer",
47
47
  "minimum": 0
48
48
  },
49
+ "credential": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
49
53
  "dashboard": {
50
54
  "type": "integer",
51
55
  "minimum": 0