blob: af6b004b1ba93c63f816ba3fa84a5c21ca15cc71 [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
35 "401":
36 content:
37 application/json:
DylanB95EST63132ce2021-12-14 16:34:38 +000038 example:
39 status: 401
40 message: Unauthorized error message
41 details: Unauthorized error details
niamhcorec1904c12021-10-11 16:38:53 +010042 schema:
43 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +010044 description: Unauthorized
45 "403":
46 content:
47 application/json:
DylanB95EST63132ce2021-12-14 16:34:38 +000048 example:
49 status: 403
50 message: Forbidden error message
51 details: Forbidden error details
mpriyank6da95412023-06-29 16:56:11 +010052 schema:
53 $ref: '#/components/schemas/ErrorMessage'
54 description: Forbidden
DylanB95ESTe5573382022-01-27 17:12:52 +000055 "500":
mpriyank6da95412023-06-29 16:56:11 +010056 content:
57 application/json:
58 example:
59 failedCreatedCmHandles:
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: "01"
65 errorText: cm-handle already exists
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 failedUpdatedCmHandles:
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 exist
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 failedRemovedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +010080 - cmHandle: my-cm-handle-01
81 errorCode: "00"
82 errorText: Unknown error. <error-details>
83 - cmHandle: my-cm-handle-02
84 errorCode: "02"
85 errorText: cm-handle does not exists
86 - cmHandle: my-cm-handle-03
87 errorCode: "03"
88 errorText: cm-handle has an invalid character(s) in id
mpriyank6da95412023-06-29 16:56:11 +010089 schema:
90 $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
emacleeafb17362022-09-02 14:40:17 +010091 description: Partial or Complete failure. The error details are provided
92 in the response body and all supported error codes are documented in the
93 example.
mpriyank6da95412023-06-29 16:56:11 +010094 summary: DMI notifies NCMP of new CM Handles
95 tags:
mpriyank41c7d002023-08-22 13:17:46 +010096 - network-cm-proxy-inventory
emacleeafb17362022-09-02 14:40:17 +010097 /v1/ch/cmHandles:
98 get:
emacleeafb17362022-09-02 14:40:17 +010099 description: Get all cm handle IDs for a registered DMI plugin
100 operationId: getAllCmHandleIdsForRegisteredDmi
101 parameters:
mpriyank41c7d002023-08-22 13:17:46 +0100102 - description: dmi-plugin-identifier
103 in: query
104 name: dmi-plugin-identifier
105 required: true
106 schema:
107 example: my-dmi-plugin
108 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000109 responses:
110 "200":
seanbeirne16e23582023-01-26 09:21:44 +0000111 content:
112 application/json:
113 schema:
seanbeirne16e23582023-01-26 09:21:44 +0000114 items:
115 type: string
mpriyank6da95412023-06-29 16:56:11 +0100116 type: array
117 description: OK
seanbeirne16e23582023-01-26 09:21:44 +0000118 "401":
seanbeirne16e23582023-01-26 09:21:44 +0000119 content:
120 application/json:
seanbeirne16e23582023-01-26 09:21:44 +0000121 example:
122 status: 401
123 message: Unauthorized error message
124 details: Unauthorized error details
seanbeirne16e23582023-01-26 09:21:44 +0000125 schema:
126 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100127 description: Unauthorized
128 "403":
129 content:
130 application/json:
seanbeirne16e23582023-01-26 09:21:44 +0000131 example:
132 status: 403
133 message: Forbidden error message
134 details: Forbidden error details
seanbeirne16e23582023-01-26 09:21:44 +0000135 schema:
136 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100137 description: Forbidden
138 "500":
139 content:
140 application/json:
seanbeirne16e23582023-01-26 09:21:44 +0000141 example:
142 status: 500
143 message: Internal Server Error
144 details: Internal Server Error occurred
mpriyank6da95412023-06-29 16:56:11 +0100145 schema:
146 $ref: '#/components/schemas/ErrorMessage'
147 description: Internal Server Error
148 summary: "Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI\
149 \ data plugin, DMI model plugin)"
150 tags:
mpriyank41c7d002023-08-22 13:17:46 +0100151 - network-cm-proxy-inventory
seanbeirne16e23582023-01-26 09:21:44 +0000152 /v1/ch/searches:
153 post:
seanbeirne16e23582023-01-26 09:21:44 +0000154 description: "Query and get CMHandleIds for additional properties, public properties\
155 \ and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin)."
156 operationId: searchCmHandleIds
157 requestBody:
158 content:
159 application/json:
160 schema:
161 $ref: '#/components/schemas/CmHandleQueryParameters'
bmiklos96d54ef2022-09-07 16:11:57 +0200162 required: true
emacleeafb17362022-09-02 14:40:17 +0100163 responses:
164 "200":
emacleeafb17362022-09-02 14:40:17 +0100165 content:
166 application/json:
167 schema:
emacleeafb17362022-09-02 14:40:17 +0100168 items:
169 type: string
mpriyank6da95412023-06-29 16:56:11 +0100170 type: array
171 description: OK
emacleeafb17362022-09-02 14:40:17 +0100172 "401":
emacleeafb17362022-09-02 14:40:17 +0100173 content:
174 application/json:
emacleeafb17362022-09-02 14:40:17 +0100175 example:
176 status: 401
177 message: Unauthorized error message
178 details: Unauthorized error details
emacleeafb17362022-09-02 14:40:17 +0100179 schema:
180 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100181 description: Unauthorized
182 "403":
183 content:
184 application/json:
emacleeafb17362022-09-02 14:40:17 +0100185 example:
186 status: 403
187 message: Forbidden error message
188 details: Forbidden error details
DylanB95ESTe5573382022-01-27 17:12:52 +0000189 schema:
190 $ref: '#/components/schemas/ErrorMessage'
mpriyank6da95412023-06-29 16:56:11 +0100191 description: Forbidden
192 "500":
193 content:
194 application/json:
DylanB95ESTe5573382022-01-27 17:12:52 +0000195 example:
196 status: 500
197 message: Internal Server Error
198 details: Internal Server Error occurred
mpriyank6da95412023-06-29 16:56:11 +0100199 schema:
200 $ref: '#/components/schemas/ErrorMessage'
201 description: Internal Server Error
202 summary: Query for CM Handle IDs
203 tags:
mpriyank41c7d002023-08-22 13:17:46 +0100204 - network-cm-proxy-inventory
niamhcorec1904c12021-10-11 16:38:53 +0100205components:
mpriyank6da95412023-06-29 16:56:11 +0100206 parameters:
207 dmiPluginIdentifierInQuery:
208 description: dmi-plugin-identifier
209 in: query
210 name: dmi-plugin-identifier
211 required: true
212 schema:
213 example: my-dmi-plugin
214 type: string
215 responses:
216 NoContent:
217 content: {}
218 description: No Content
219 BadRequest:
220 content:
221 application/json:
222 example:
223 status: 400 BAD_REQUEST
224 message: Bad request error message
225 details: Bad request error details
226 schema:
227 $ref: '#/components/schemas/ErrorMessage'
228 description: Bad Request
229 Unauthorized:
230 content:
231 application/json:
232 example:
233 status: 401
234 message: Unauthorized error message
235 details: Unauthorized error details
236 schema:
237 $ref: '#/components/schemas/ErrorMessage'
238 description: Unauthorized
239 Forbidden:
240 content:
241 application/json:
242 example:
243 status: 403
244 message: Forbidden error message
245 details: Forbidden error details
246 schema:
247 $ref: '#/components/schemas/ErrorMessage'
248 description: Forbidden
249 InternalServerError:
250 content:
251 application/json:
252 example:
253 status: 500
254 message: Internal Server Error
255 details: Internal Server Error occurred
256 schema:
257 $ref: '#/components/schemas/ErrorMessage'
258 description: Internal Server Error
niamhcorec1904c12021-10-11 16:38:53 +0100259 schemas:
260 RestDmiPluginRegistration:
mpriyank6da95412023-06-29 16:56:11 +0100261 example:
niamhcorec1904c12021-10-11 16:38:53 +0100262 updatedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100263 - cmHandle: my-cm-handle
264 publicCmHandleProperties:
265 key: my-property
266 cmHandleProperties:
267 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100268 moduleSetTag: my-module-set-tag
mpriyank41c7d002023-08-22 13:17:46 +0100269 - cmHandle: my-cm-handle
270 publicCmHandleProperties:
271 key: my-property
272 cmHandleProperties:
273 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100274 moduleSetTag: my-module-set-tag
mpriyank6da95412023-06-29 16:56:11 +0100275 createdCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100276 - cmHandle: my-cm-handle
277 publicCmHandleProperties:
278 key: my-property
279 cmHandleProperties:
280 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100281 moduleSetTag: my-module-set-tag
mpriyank41c7d002023-08-22 13:17:46 +0100282 - cmHandle: my-cm-handle
283 publicCmHandleProperties:
284 key: my-property
285 cmHandleProperties:
286 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100287 moduleSetTag: my-module-set-tag
mpriyank6da95412023-06-29 16:56:11 +0100288 dmiPlugin: my-dmi-plugin
289 dmiModelPlugin: my-dmi-model-plugin
290 dmiDataPlugin: my-dmi-data-plugin
niamhcorec1904c12021-10-11 16:38:53 +0100291 removedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100292 - my-cm-handle1
293 - my-cm-handle2
294 - my-cm-handle3
mpriyank6da95412023-06-29 16:56:11 +0100295 properties:
296 dmiPlugin:
297 default: ""
298 example: my-dmi-plugin
299 type: string
300 dmiDataPlugin:
301 default: ""
302 example: my-dmi-data-plugin
303 type: string
304 dmiModelPlugin:
305 default: ""
306 example: my-dmi-model-plugin
307 type: string
308 createdCmHandles:
309 items:
310 $ref: '#/components/schemas/RestInputCmHandle'
311 type: array
312 updatedCmHandles:
313 items:
314 $ref: '#/components/schemas/RestInputCmHandle'
315 type: array
316 removedCmHandles:
317 example:
mpriyank41c7d002023-08-22 13:17:46 +0100318 - my-cm-handle1
319 - my-cm-handle2
320 - my-cm-handle3
niamhcorec1904c12021-10-11 16:38:53 +0100321 items:
322 type: string
mpriyank6da95412023-06-29 16:56:11 +0100323 type: array
niamhcorec1904c12021-10-11 16:38:53 +0100324 type: object
mpriyank6da95412023-06-29 16:56:11 +0100325 RestInputCmHandle:
326 example:
327 cmHandle: my-cm-handle
328 publicCmHandleProperties:
329 key: my-property
330 cmHandleProperties:
331 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100332 moduleSetTag: my-module-set-tag
niamhcorec1904c12021-10-11 16:38:53 +0100333 properties:
334 cmHandle:
DylanB95EST63132ce2021-12-14 16:34:38 +0000335 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100336 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100337 cmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100338 additionalProperties:
339 example: my-property
340 type: string
341 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000342 publicCmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100343 additionalProperties:
344 example: my-property
345 type: string
346 type: object
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100347 moduleSetTag:
348 example: my-module-set-tag
349 type: string
mpriyank6da95412023-06-29 16:56:11 +0100350 required:
mpriyank41c7d002023-08-22 13:17:46 +0100351 - cmHandle
mpriyank6da95412023-06-29 16:56:11 +0100352 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000353 RestCmHandleProperties:
niamhcorec1904c12021-10-11 16:38:53 +0100354 additionalProperties:
DylanB95EST63132ce2021-12-14 16:34:38 +0000355 example: my-property
mpriyank6da95412023-06-29 16:56:11 +0100356 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100357 type: object
mpriyank6da95412023-06-29 16:56:11 +0100358 ErrorMessage:
niamhcorec1904c12021-10-11 16:38:53 +0100359 properties:
360 status:
361 type: string
362 message:
363 type: string
364 details:
365 type: string
mpriyank6da95412023-06-29 16:56:11 +0100366 title: Error
emacleeafb17362022-09-02 14:40:17 +0100367 type: object
mpriyank6da95412023-06-29 16:56:11 +0100368 DmiPluginRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100369 properties:
370 failedCreatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100371 items:
372 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100373 type: array
emacleeafb17362022-09-02 14:40:17 +0100374 failedUpdatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100375 items:
376 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100377 type: array
emacleeafb17362022-09-02 14:40:17 +0100378 failedRemovedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100379 items:
380 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100381 type: array
emacleeafb17362022-09-02 14:40:17 +0100382 type: object
mpriyank6da95412023-06-29 16:56:11 +0100383 CmHandlerRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100384 properties:
385 cmHandle:
emacleeafb17362022-09-02 14:40:17 +0100386 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100387 type: string
emacleeafb17362022-09-02 14:40:17 +0100388 errorCode:
emacleeafb17362022-09-02 14:40:17 +0100389 example: "00"
emacleeafb17362022-09-02 14:40:17 +0100390 type: string
mpriyank6da95412023-06-29 16:56:11 +0100391 errorText:
emacleeafb17362022-09-02 14:40:17 +0100392 example: Unknown error. <error-details>
mpriyank6da95412023-06-29 16:56:11 +0100393 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000394 type: object
mpriyank6da95412023-06-29 16:56:11 +0100395 CmHandleQueryParameters:
396 example:
397 cmHandleQueryParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100398 - conditionParameters:
399 - key: conditionParameters
400 - key: conditionParameters
401 conditionName: conditionName
402 - conditionParameters:
403 - key: conditionParameters
404 - key: conditionParameters
405 conditionName: conditionName
mpriyank6da95412023-06-29 16:56:11 +0100406 conditions:
mpriyank41c7d002023-08-22 13:17:46 +0100407 - name: name
408 conditionParameters:
409 - moduleName: my-module
410 - moduleName: my-module
411 - name: name
412 conditionParameters:
413 - moduleName: my-module
414 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000415 properties:
416 cmHandleQueryParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000417 items:
418 $ref: '#/components/schemas/ConditionProperties'
seanbeirne16e23582023-01-26 09:21:44 +0000419 type: array
mpriyank6da95412023-06-29 16:56:11 +0100420 conditions:
seanbeirne16e23582023-01-26 09:21:44 +0000421 deprecated: true
mpriyank6da95412023-06-29 16:56:11 +0100422 description: "not necessary, it is just for backward compatibility"
seanbeirne16e23582023-01-26 09:21:44 +0000423 items:
424 $ref: '#/components/schemas/OldConditionProperties'
mpriyank6da95412023-06-29 16:56:11 +0100425 type: array
426 title: Cm Handle query parameters for executing cm handle search
427 type: object
seanbeirne16e23582023-01-26 09:21:44 +0000428 ConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100429 example:
430 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100431 - key: conditionParameters
432 - key: conditionParameters
mpriyank6da95412023-06-29 16:56:11 +0100433 conditionName: conditionName
seanbeirne16e23582023-01-26 09:21:44 +0000434 properties:
435 conditionName:
436 type: string
437 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000438 items:
seanbeirne16e23582023-01-26 09:21:44 +0000439 additionalProperties:
440 type: string
mpriyank6da95412023-06-29 16:56:11 +0100441 type: object
442 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000443 OldConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100444 deprecated: true
445 example:
446 name: name
447 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100448 - moduleName: my-module
449 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000450 properties:
451 name:
452 type: string
453 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000454 items:
455 $ref: '#/components/schemas/ModuleNameAsJsonObject'
mpriyank6da95412023-06-29 16:56:11 +0100456 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000457 ModuleNameAsJsonObject:
mpriyank6da95412023-06-29 16:56:11 +0100458 example:
459 moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000460 properties:
461 moduleName:
seanbeirne16e23582023-01-26 09:21:44 +0000462 example: my-module
mpriyank6da95412023-06-29 16:56:11 +0100463 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000464 securitySchemes:
465 basicAuth:
seanbeirne16e23582023-01-26 09:21:44 +0000466 scheme: basic
mpriyank6da95412023-06-29 16:56:11 +0100467 type: http