blob: ff9f4ba6839263117b4c36543d7f2209bdb357d3 [file] [log] [blame]
mpriyank6da95412023-06-29 16:56:11 +01001openapi: 3.0.3
niamhcorec1904c12021-10-11 16:38:53 +01002info:
niamhcorec1904c12021-10-11 16:38:53 +01003 description: NCMP Inventory API
mpriyank6da95412023-06-29 16:56:11 +01004 title: NCMP Inventory API
niamhcorec1904c12021-10-11 16:38:53 +01005 version: "1.0"
6servers:
mpriyank41c7d002023-08-22 13:17:46 +01007- url: /ncmpInventory
seanbeirne16e23582023-01-26 09:21:44 +00008security:
mpriyank41c7d002023-08-22 13:17:46 +01009- basicAuth: []
niamhcorec1904c12021-10-11 16:38:53 +010010paths:
11 /v1/ch:
12 post:
niamhcorec1904c12021-10-11 16:38:53 +010013 description: "Register a DMI Plugin with any new, updated or removed CM Handles."
14 operationId: updateDmiPluginRegistration
15 requestBody:
16 content:
17 application/json:
18 schema:
19 $ref: '#/components/schemas/RestDmiPluginRegistration'
20 required: true
21 responses:
emacleeafb17362022-09-02 14:40:17 +010022 "200":
niamhcorec1904c12021-10-11 16:38:53 +010023 content: {}
mpriyank6da95412023-06-29 16:56:11 +010024 description: No Content
niamhcorec1904c12021-10-11 16:38:53 +010025 "400":
niamhcorec1904c12021-10-11 16:38:53 +010026 content:
27 application/json:
DylanB95EST63132ce2021-12-14 16:34:38 +000028 example:
29 status: 400 BAD_REQUEST
30 message: Bad request error message
31 details: Bad request error details
niamhcorec1904c12021-10-11 16:38:53 +010032 schema:
33 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +010034 description: Bad Request
mpriyank6da95412023-06-29 16:56:11 +010035 "403":
36 content:
37 application/json:
DylanB95EST63132ce2021-12-14 16:34:38 +000038 example:
39 status: 403
40 message: Forbidden error message
41 details: Forbidden error details
mpriyank6da95412023-06-29 16:56:11 +010042 schema:
43 $ref: '#/components/schemas/ErrorMessage'
44 description: Forbidden
DylanB95ESTe5573382022-01-27 17:12:52 +000045 "500":
mpriyank6da95412023-06-29 16:56:11 +010046 content:
47 application/json:
48 example:
49 failedCreatedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +010050 - cmHandle: my-cm-handle-01
51 errorCode: "00"
52 errorText: Unknown error. <error-details>
53 - cmHandle: my-cm-handle-02
54 errorCode: "01"
55 errorText: cm-handle already exists
56 - cmHandle: my-cm-handle-03
57 errorCode: "03"
58 errorText: cm-handle has an invalid character(s) in id
mpriyank6da95412023-06-29 16:56:11 +010059 failedUpdatedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +010060 - cmHandle: my-cm-handle-01
61 errorCode: "00"
62 errorText: Unknown error. <error-details>
63 - cmHandle: my-cm-handle-02
64 errorCode: "02"
65 errorText: cm-handle does not exist
66 - cmHandle: my-cm-handle-03
67 errorCode: "03"
68 errorText: cm-handle has an invalid character(s) in id
mpriyank6da95412023-06-29 16:56:11 +010069 failedRemovedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +010070 - cmHandle: my-cm-handle-01
71 errorCode: "00"
72 errorText: Unknown error. <error-details>
73 - cmHandle: my-cm-handle-02
74 errorCode: "02"
75 errorText: cm-handle does not exists
76 - cmHandle: my-cm-handle-03
77 errorCode: "03"
78 errorText: cm-handle has an invalid character(s) in id
mpriyank6da95412023-06-29 16:56:11 +010079 schema:
80 $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
emacleeafb17362022-09-02 14:40:17 +010081 description: Partial or Complete failure. The error details are provided
82 in the response body and all supported error codes are documented in the
83 example.
mpriyank6da95412023-06-29 16:56:11 +010084 summary: DMI notifies NCMP of new CM Handles
85 tags:
mpriyank41c7d002023-08-22 13:17:46 +010086 - network-cm-proxy-inventory
emacleeafb17362022-09-02 14:40:17 +010087 /v1/ch/cmHandles:
88 get:
emacleeafb17362022-09-02 14:40:17 +010089 description: Get all cm handle IDs for a registered DMI plugin
90 operationId: getAllCmHandleIdsForRegisteredDmi
91 parameters:
mpriyank41c7d002023-08-22 13:17:46 +010092 - description: dmi-plugin-identifier
93 in: query
94 name: dmi-plugin-identifier
95 required: true
96 schema:
97 example: my-dmi-plugin
98 type: string
seanbeirne16e23582023-01-26 09:21:44 +000099 responses:
100 "200":
seanbeirne16e23582023-01-26 09:21:44 +0000101 content:
102 application/json:
103 schema:
seanbeirne16e23582023-01-26 09:21:44 +0000104 items:
105 type: string
mpriyank6da95412023-06-29 16:56:11 +0100106 type: array
107 description: OK
mpriyank6da95412023-06-29 16:56:11 +0100108 "403":
109 content:
110 application/json:
seanbeirne16e23582023-01-26 09:21:44 +0000111 example:
112 status: 403
113 message: Forbidden error message
114 details: Forbidden error details
seanbeirne16e23582023-01-26 09:21:44 +0000115 schema:
116 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100117 description: Forbidden
118 "500":
119 content:
120 application/json:
seanbeirne16e23582023-01-26 09:21:44 +0000121 example:
122 status: 500
123 message: Internal Server Error
124 details: Internal Server Error occurred
mpriyank6da95412023-06-29 16:56:11 +0100125 schema:
126 $ref: '#/components/schemas/ErrorMessage'
127 description: Internal Server Error
128 summary: "Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI\
129 \ data plugin, DMI model plugin)"
130 tags:
mpriyank41c7d002023-08-22 13:17:46 +0100131 - network-cm-proxy-inventory
seanbeirne16e23582023-01-26 09:21:44 +0000132 /v1/ch/searches:
133 post:
seanbeirne16e23582023-01-26 09:21:44 +0000134 description: "Query and get CMHandleIds for additional properties, public properties\
135 \ and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin)."
136 operationId: searchCmHandleIds
137 requestBody:
138 content:
139 application/json:
140 schema:
141 $ref: '#/components/schemas/CmHandleQueryParameters'
bmiklos96d54ef2022-09-07 16:11:57 +0200142 required: true
emacleeafb17362022-09-02 14:40:17 +0100143 responses:
144 "200":
emacleeafb17362022-09-02 14:40:17 +0100145 content:
146 application/json:
147 schema:
emacleeafb17362022-09-02 14:40:17 +0100148 items:
149 type: string
mpriyank6da95412023-06-29 16:56:11 +0100150 type: array
151 description: OK
mpriyank6da95412023-06-29 16:56:11 +0100152 "403":
153 content:
154 application/json:
emacleeafb17362022-09-02 14:40:17 +0100155 example:
156 status: 403
157 message: Forbidden error message
158 details: Forbidden error details
DylanB95ESTe5573382022-01-27 17:12:52 +0000159 schema:
160 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100161 description: Forbidden
162 "500":
163 content:
164 application/json:
DylanB95ESTe5573382022-01-27 17:12:52 +0000165 example:
166 status: 500
167 message: Internal Server Error
168 details: Internal Server Error occurred
mpriyank6da95412023-06-29 16:56:11 +0100169 schema:
170 $ref: '#/components/schemas/ErrorMessage'
171 description: Internal Server Error
172 summary: Query for CM Handle IDs
173 tags:
mpriyank41c7d002023-08-22 13:17:46 +0100174 - network-cm-proxy-inventory
niamhcorec1904c12021-10-11 16:38:53 +0100175components:
mpriyank6da95412023-06-29 16:56:11 +0100176 parameters:
177 dmiPluginIdentifierInQuery:
178 description: dmi-plugin-identifier
179 in: query
180 name: dmi-plugin-identifier
181 required: true
182 schema:
183 example: my-dmi-plugin
184 type: string
185 responses:
186 NoContent:
187 content: {}
188 description: No Content
189 BadRequest:
190 content:
191 application/json:
192 example:
193 status: 400 BAD_REQUEST
194 message: Bad request error message
195 details: Bad request error details
196 schema:
197 $ref: '#/components/schemas/ErrorMessage'
198 description: Bad Request
mpriyank6da95412023-06-29 16:56:11 +0100199 Forbidden:
200 content:
201 application/json:
202 example:
203 status: 403
204 message: Forbidden error message
205 details: Forbidden error details
206 schema:
207 $ref: '#/components/schemas/ErrorMessage'
208 description: Forbidden
209 InternalServerError:
210 content:
211 application/json:
212 example:
213 status: 500
214 message: Internal Server Error
215 details: Internal Server Error occurred
216 schema:
217 $ref: '#/components/schemas/ErrorMessage'
218 description: Internal Server Error
niamhcorec1904c12021-10-11 16:38:53 +0100219 schemas:
220 RestDmiPluginRegistration:
mpriyank6da95412023-06-29 16:56:11 +0100221 example:
niamhcorec1904c12021-10-11 16:38:53 +0100222 updatedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100223 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000224 alternateId: my-alternate-id
mpriyank41c7d002023-08-22 13:17:46 +0100225 publicCmHandleProperties:
226 key: my-property
227 cmHandleProperties:
228 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100229 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000230 trustLevel: COMPLETE
mpriyank41c7d002023-08-22 13:17:46 +0100231 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000232 alternateId: my-alternate-id
mpriyank41c7d002023-08-22 13:17:46 +0100233 publicCmHandleProperties:
234 key: my-property
235 cmHandleProperties:
236 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100237 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000238 trustLevel: COMPLETE
mpriyank6da95412023-06-29 16:56:11 +0100239 createdCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100240 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000241 alternateId: my-alternate-id
mpriyank41c7d002023-08-22 13:17:46 +0100242 publicCmHandleProperties:
243 key: my-property
244 cmHandleProperties:
245 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100246 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000247 trustLevel: COMPLETE
mpriyank41c7d002023-08-22 13:17:46 +0100248 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000249 alternateId: my-alternate-id
mpriyank41c7d002023-08-22 13:17:46 +0100250 publicCmHandleProperties:
251 key: my-property
252 cmHandleProperties:
253 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100254 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000255 trustLevel: COMPLETE
mpriyank6da95412023-06-29 16:56:11 +0100256 dmiPlugin: my-dmi-plugin
257 dmiModelPlugin: my-dmi-model-plugin
egernugfb09b7c2023-10-12 13:33:08 +0100258 upgradedCmHandles:
259 cmHandles:
260 - my-cm-handle1
261 - my-cm-handle2
262 - my-cm-handle3
263 moduleSetTag: my-module-set-tag
mpriyank6da95412023-06-29 16:56:11 +0100264 dmiDataPlugin: my-dmi-data-plugin
niamhcorec1904c12021-10-11 16:38:53 +0100265 removedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100266 - my-cm-handle1
267 - my-cm-handle2
268 - my-cm-handle3
mpriyank6da95412023-06-29 16:56:11 +0100269 properties:
270 dmiPlugin:
271 default: ""
272 example: my-dmi-plugin
273 type: string
274 dmiDataPlugin:
275 default: ""
276 example: my-dmi-data-plugin
277 type: string
278 dmiModelPlugin:
279 default: ""
280 example: my-dmi-model-plugin
281 type: string
282 createdCmHandles:
283 items:
284 $ref: '#/components/schemas/RestInputCmHandle'
285 type: array
286 updatedCmHandles:
287 items:
288 $ref: '#/components/schemas/RestInputCmHandle'
289 type: array
290 removedCmHandles:
291 example:
mpriyank41c7d002023-08-22 13:17:46 +0100292 - my-cm-handle1
293 - my-cm-handle2
294 - my-cm-handle3
niamhcorec1904c12021-10-11 16:38:53 +0100295 items:
296 type: string
mpriyank6da95412023-06-29 16:56:11 +0100297 type: array
egernugfb09b7c2023-10-12 13:33:08 +0100298 upgradedCmHandles:
299 $ref: '#/components/schemas/UpgradedCmHandles'
niamhcorec1904c12021-10-11 16:38:53 +0100300 type: object
mpriyank6da95412023-06-29 16:56:11 +0100301 RestInputCmHandle:
302 example:
303 cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000304 alternateId: my-alternate-id
mpriyank6da95412023-06-29 16:56:11 +0100305 publicCmHandleProperties:
306 key: my-property
307 cmHandleProperties:
308 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100309 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000310 trustLevel: COMPLETE
niamhcorec1904c12021-10-11 16:38:53 +0100311 properties:
312 cmHandle:
DylanB95EST63132ce2021-12-14 16:34:38 +0000313 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100314 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100315 cmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100316 additionalProperties:
317 example: my-property
318 type: string
319 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000320 publicCmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100321 additionalProperties:
322 example: my-property
323 type: string
324 type: object
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100325 moduleSetTag:
326 example: my-module-set-tag
327 type: string
mpriyankd74c2d22023-11-06 13:25:38 +0000328 trustLevel:
329 enum:
330 - COMPLETE
331 - NONE
332 example: COMPLETE
333 type: string
danielhanrahan3e14d392023-12-20 13:31:07 +0000334 alternateId:
335 example: my-alternate-id
336 type: string
mpriyank6da95412023-06-29 16:56:11 +0100337 required:
mpriyank41c7d002023-08-22 13:17:46 +0100338 - cmHandle
mpriyank6da95412023-06-29 16:56:11 +0100339 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000340 RestCmHandleProperties:
niamhcorec1904c12021-10-11 16:38:53 +0100341 additionalProperties:
DylanB95EST63132ce2021-12-14 16:34:38 +0000342 example: my-property
mpriyank6da95412023-06-29 16:56:11 +0100343 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100344 type: object
egernugfb09b7c2023-10-12 13:33:08 +0100345 UpgradedCmHandles:
346 example:
347 cmHandles:
348 - my-cm-handle1
349 - my-cm-handle2
350 - my-cm-handle3
351 moduleSetTag: my-module-set-tag
352 properties:
353 cmHandles:
354 example:
355 - my-cm-handle1
356 - my-cm-handle2
357 - my-cm-handle3
358 items:
359 type: string
360 type: array
361 moduleSetTag:
danielhanrahan3e14d392023-12-20 13:31:07 +0000362 default: ""
egernugfb09b7c2023-10-12 13:33:08 +0100363 example: my-module-set-tag
364 type: string
365 required:
366 - cmHandles
367 type: object
mpriyank6da95412023-06-29 16:56:11 +0100368 ErrorMessage:
niamhcorec1904c12021-10-11 16:38:53 +0100369 properties:
370 status:
371 type: string
372 message:
373 type: string
374 details:
375 type: string
mpriyank6da95412023-06-29 16:56:11 +0100376 title: Error
emacleeafb17362022-09-02 14:40:17 +0100377 type: object
mpriyank6da95412023-06-29 16:56:11 +0100378 DmiPluginRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100379 properties:
380 failedCreatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100381 items:
382 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100383 type: array
emacleeafb17362022-09-02 14:40:17 +0100384 failedUpdatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100385 items:
386 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100387 type: array
emacleeafb17362022-09-02 14:40:17 +0100388 failedRemovedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100389 items:
390 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100391 type: array
egernugfb09b7c2023-10-12 13:33:08 +0100392 failedUpgradeCmHandles:
393 items:
394 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
395 type: array
emacleeafb17362022-09-02 14:40:17 +0100396 type: object
mpriyank6da95412023-06-29 16:56:11 +0100397 CmHandlerRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100398 properties:
399 cmHandle:
emacleeafb17362022-09-02 14:40:17 +0100400 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100401 type: string
emacleeafb17362022-09-02 14:40:17 +0100402 errorCode:
emacleeafb17362022-09-02 14:40:17 +0100403 example: "00"
emacleeafb17362022-09-02 14:40:17 +0100404 type: string
mpriyank6da95412023-06-29 16:56:11 +0100405 errorText:
emacleeafb17362022-09-02 14:40:17 +0100406 example: Unknown error. <error-details>
mpriyank6da95412023-06-29 16:56:11 +0100407 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000408 type: object
mpriyank6da95412023-06-29 16:56:11 +0100409 CmHandleQueryParameters:
410 example:
411 cmHandleQueryParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100412 - conditionParameters:
413 - key: conditionParameters
414 - key: conditionParameters
415 conditionName: conditionName
416 - conditionParameters:
417 - key: conditionParameters
418 - key: conditionParameters
419 conditionName: conditionName
mpriyank6da95412023-06-29 16:56:11 +0100420 conditions:
mpriyank41c7d002023-08-22 13:17:46 +0100421 - name: name
422 conditionParameters:
423 - moduleName: my-module
424 - moduleName: my-module
425 - name: name
426 conditionParameters:
427 - moduleName: my-module
428 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000429 properties:
430 cmHandleQueryParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000431 items:
432 $ref: '#/components/schemas/ConditionProperties'
seanbeirne16e23582023-01-26 09:21:44 +0000433 type: array
mpriyank6da95412023-06-29 16:56:11 +0100434 conditions:
seanbeirne16e23582023-01-26 09:21:44 +0000435 deprecated: true
mpriyank6da95412023-06-29 16:56:11 +0100436 description: "not necessary, it is just for backward compatibility"
seanbeirne16e23582023-01-26 09:21:44 +0000437 items:
438 $ref: '#/components/schemas/OldConditionProperties'
mpriyank6da95412023-06-29 16:56:11 +0100439 type: array
440 title: Cm Handle query parameters for executing cm handle search
441 type: object
seanbeirne16e23582023-01-26 09:21:44 +0000442 ConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100443 example:
444 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100445 - key: conditionParameters
446 - key: conditionParameters
mpriyank6da95412023-06-29 16:56:11 +0100447 conditionName: conditionName
seanbeirne16e23582023-01-26 09:21:44 +0000448 properties:
449 conditionName:
450 type: string
451 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000452 items:
seanbeirne16e23582023-01-26 09:21:44 +0000453 additionalProperties:
454 type: string
mpriyank6da95412023-06-29 16:56:11 +0100455 type: object
456 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000457 OldConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100458 deprecated: true
459 example:
460 name: name
461 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100462 - moduleName: my-module
463 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000464 properties:
465 name:
466 type: string
467 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000468 items:
469 $ref: '#/components/schemas/ModuleNameAsJsonObject'
mpriyank6da95412023-06-29 16:56:11 +0100470 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000471 ModuleNameAsJsonObject:
mpriyank6da95412023-06-29 16:56:11 +0100472 example:
473 moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000474 properties:
475 moduleName:
seanbeirne16e23582023-01-26 09:21:44 +0000476 example: my-module
mpriyank6da95412023-06-29 16:56:11 +0100477 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000478 securitySchemes:
479 basicAuth:
seanbeirne16e23582023-01-26 09:21:44 +0000480 scheme: basic
mpriyank6da95412023-06-29 16:56:11 +0100481 type: http