forked from open-horizon/open-horizon.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdo_swagger.json
286 lines (286 loc) · 7.18 KB
/
sdo_swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
{
"swagger": "2.0",
"info": {
"description": "[Intel SDO](https://software.intel.com/en-us/secure-device-onboard) (Secure Device Onboard) is a technology that is created by Intel to make it easy and secure to configure edge devices and associate them with an OH instance. OH has added support for SDO-enabled devices so that the agent will be installed on the device and registered to the OH management hub with zero touch (by simply powering on the device).<br><br>Examples of using this API:<br><br>`curl -sS $HZN_SDO_SVC_URL/version && echo`<br>`curl -sS -w %{http_code} -u $HZN_ORG_ID/$HZN_EXCHANGE_USER_AUTH $HZN_SDO_SVC_URL/vouchers | jq`<br><br>Note: Some of these APIs can also be run via the `hzn` command.",
"version": "1.8",
"title": "OH Support for SDO",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"schemes": [
"https"
],
"paths": {
"/version": {
"get": {
"tags": [
"OCS-API"
],
"summary": "Get SDO Owner Services version",
"description": "Note: This API does not require credentials.",
"operationId": "getVersion",
"produces": [
"application/text"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Version"
}
}
}
}
},
"/vouchers": {
"post": {
"tags": [
"OCS-API"
],
"summary": "Import a voucher into the management hub",
"description": "",
"operationId": "importVoucher",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Voucher to be imported",
"required": true,
"schema": {
"$ref": "#/definitions/Voucher"
}
}
],
"responses": {
"201": {
"description": "Voucher imported"
},
"400": {
"description": "Invalid input"
},
"401": {
"description": "Invalid credentials"
},
"403": {
"description": "Permission denied"
},
"500": {
"description": "Error importing voucher"
}
}
},
"get": {
"tags": [
"OCS-API"
],
"summary": "Get list of imported voucher IDs",
"description": "",
"operationId": "getVouchers",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/VoucherIdList"
}
},
"401": {
"description": "Invalid credentials"
},
"403": {
"description": "Permission denied"
}
}
}
},
"/vouchers/{device-id}": {
"get": {
"tags": [
"OCS-API"
],
"summary": "Get one imported voucher",
"description": "",
"operationId": "getVoucher",
"parameters": [
{
"name": "device-id",
"in": "path",
"description": "ID of the device you want the voucher for",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Voucher"
}
},
"400": {
"description": "Invalid voucher id"
},
"401": {
"description": "Invalid credentials"
},
"403": {
"description": "Permission denied"
}
}
}
},
"/rereadagentinstall": {
"post": {
"tags": [
"OCS-API"
],
"summary": "Have the management hub read a more recent version of agent-install.sh",
"description": "",
"operationId": "rereadAgentInstall",
"responses": {
"200": {
"description": "Reread successful"
},
"401": {
"description": "Invalid credentials"
},
"403": {
"description": "Permission denied"
},
"500": {
"description": "Error getting agent-install.sh"
}
}
}
},
"/keys": {
"post": {
"tags": [
"OCS-API"
],
"summary": "Import owner private keys into the management hub",
"description": "",
"operationId": "importKeys",
"consumes": [
"application/octet-stream"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Private keys tar file to be imported",
"required": true,
"schema": {
"$ref": "#/definitions/KeysTarFile"
}
}
],
"responses": {
"201": {
"description": "Keys imported"
},
"400": {
"description": "Invalid input"
},
"401": {
"description": "Invalid credentials"
},
"403": {
"description": "Permission denied"
},
"500": {
"description": "Error importing keys"
}
}
}
}
},
"definitions": {
"Version": {
"type": "string"
},
"Voucher": {
"type": "object",
"properties": {
"sz": {
"type": "integer",
"format": "int32"
},
"oh": {
"type": "object",
"properties": {
"pv": {
"type": "integer",
"format": "int32"
},
"pe": {
"type": "integer",
"format": "int32"
},
"r": {
"type": "array",
"items": {
"type": "object"
}
},
"g": {
"type": "string",
"description": "base64 encoded"
},
"d": {
"type": "string"
},
"pk": {
"type": "array",
"items": {
"type": "object"
}
}
}
},
"hmac": {
"type": "array",
"items": {
"type": "object"
}
},
"en": {
"type": "array",
"items": {
"type": "object"
}
}
},
"xml": {
"name": "Voucher"
}
},
"VoucherIdList": {
"type": "array",
"items": {
"type": "string",
"description": "voucher device id"
}
},
"KeysTarFile": {
"type": "string",
"description": "gzipped tar file of private keys",
"xml": {
"name": "KeysTarFile"
}
}
}
}