blob: 8a6c13ebecab408e2a7e17eb21e1e156c017650b [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
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000225 dataProducerIdentifier: my-data-producer-identifier
mpriyank41c7d002023-08-22 13:17:46 +0100226 publicCmHandleProperties:
227 key: my-property
228 cmHandleProperties:
229 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100230 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000231 trustLevel: COMPLETE
mpriyank41c7d002023-08-22 13:17:46 +0100232 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000233 alternateId: my-alternate-id
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000234 dataProducerIdentifier: my-data-producer-identifier
mpriyank41c7d002023-08-22 13:17:46 +0100235 publicCmHandleProperties:
236 key: my-property
237 cmHandleProperties:
238 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100239 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000240 trustLevel: COMPLETE
mpriyank6da95412023-06-29 16:56:11 +0100241 createdCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100242 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000243 alternateId: my-alternate-id
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000244 dataProducerIdentifier: my-data-producer-identifier
mpriyank41c7d002023-08-22 13:17:46 +0100245 publicCmHandleProperties:
246 key: my-property
247 cmHandleProperties:
248 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100249 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000250 trustLevel: COMPLETE
mpriyank41c7d002023-08-22 13:17:46 +0100251 - cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000252 alternateId: my-alternate-id
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000253 dataProducerIdentifier: my-data-producer-identifier
mpriyank41c7d002023-08-22 13:17:46 +0100254 publicCmHandleProperties:
255 key: my-property
256 cmHandleProperties:
257 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100258 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000259 trustLevel: COMPLETE
mpriyank6da95412023-06-29 16:56:11 +0100260 dmiPlugin: my-dmi-plugin
261 dmiModelPlugin: my-dmi-model-plugin
egernugfb09b7c2023-10-12 13:33:08 +0100262 upgradedCmHandles:
263 cmHandles:
264 - my-cm-handle1
265 - my-cm-handle2
266 - my-cm-handle3
267 moduleSetTag: my-module-set-tag
mpriyank6da95412023-06-29 16:56:11 +0100268 dmiDataPlugin: my-dmi-data-plugin
niamhcorec1904c12021-10-11 16:38:53 +0100269 removedCmHandles:
mpriyank41c7d002023-08-22 13:17:46 +0100270 - my-cm-handle1
271 - my-cm-handle2
272 - my-cm-handle3
mpriyank6da95412023-06-29 16:56:11 +0100273 properties:
274 dmiPlugin:
275 default: ""
276 example: my-dmi-plugin
277 type: string
278 dmiDataPlugin:
279 default: ""
280 example: my-dmi-data-plugin
281 type: string
282 dmiModelPlugin:
283 default: ""
284 example: my-dmi-model-plugin
285 type: string
286 createdCmHandles:
287 items:
288 $ref: '#/components/schemas/RestInputCmHandle'
289 type: array
290 updatedCmHandles:
291 items:
292 $ref: '#/components/schemas/RestInputCmHandle'
293 type: array
294 removedCmHandles:
295 example:
mpriyank41c7d002023-08-22 13:17:46 +0100296 - my-cm-handle1
297 - my-cm-handle2
298 - my-cm-handle3
niamhcorec1904c12021-10-11 16:38:53 +0100299 items:
300 type: string
mpriyank6da95412023-06-29 16:56:11 +0100301 type: array
egernugfb09b7c2023-10-12 13:33:08 +0100302 upgradedCmHandles:
303 $ref: '#/components/schemas/UpgradedCmHandles'
niamhcorec1904c12021-10-11 16:38:53 +0100304 type: object
mpriyank6da95412023-06-29 16:56:11 +0100305 RestInputCmHandle:
306 example:
307 cmHandle: my-cm-handle
danielhanrahan3e14d392023-12-20 13:31:07 +0000308 alternateId: my-alternate-id
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000309 dataProducerIdentifier: my-data-producer-identifier
mpriyank6da95412023-06-29 16:56:11 +0100310 publicCmHandleProperties:
311 key: my-property
312 cmHandleProperties:
313 key: my-property
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100314 moduleSetTag: my-module-set-tag
mpriyankd74c2d22023-11-06 13:25:38 +0000315 trustLevel: COMPLETE
niamhcorec1904c12021-10-11 16:38:53 +0100316 properties:
317 cmHandle:
DylanB95EST63132ce2021-12-14 16:34:38 +0000318 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100319 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100320 cmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100321 additionalProperties:
322 example: my-property
323 type: string
324 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000325 publicCmHandleProperties:
mpriyank6da95412023-06-29 16:56:11 +0100326 additionalProperties:
327 example: my-property
328 type: string
329 type: object
danielhanrahanc3e7b0e2023-09-20 15:01:59 +0100330 moduleSetTag:
331 example: my-module-set-tag
332 type: string
mpriyankd74c2d22023-11-06 13:25:38 +0000333 trustLevel:
334 enum:
335 - COMPLETE
336 - NONE
337 example: COMPLETE
338 type: string
danielhanrahan3e14d392023-12-20 13:31:07 +0000339 alternateId:
340 example: my-alternate-id
341 type: string
JvD_Ericssone14fe9a2024-02-26 13:45:47 +0000342 dataProducerIdentifier:
343 example: my-data-producer-identifier
344 type: string
mpriyank6da95412023-06-29 16:56:11 +0100345 required:
mpriyank41c7d002023-08-22 13:17:46 +0100346 - cmHandle
mpriyank6da95412023-06-29 16:56:11 +0100347 type: object
DylanB95EST63132ce2021-12-14 16:34:38 +0000348 RestCmHandleProperties:
niamhcorec1904c12021-10-11 16:38:53 +0100349 additionalProperties:
DylanB95EST63132ce2021-12-14 16:34:38 +0000350 example: my-property
mpriyank6da95412023-06-29 16:56:11 +0100351 type: string
niamhcorec1904c12021-10-11 16:38:53 +0100352 type: object
egernugfb09b7c2023-10-12 13:33:08 +0100353 UpgradedCmHandles:
354 example:
355 cmHandles:
356 - my-cm-handle1
357 - my-cm-handle2
358 - my-cm-handle3
359 moduleSetTag: my-module-set-tag
360 properties:
361 cmHandles:
362 example:
363 - my-cm-handle1
364 - my-cm-handle2
365 - my-cm-handle3
366 items:
367 type: string
368 type: array
369 moduleSetTag:
danielhanrahan3e14d392023-12-20 13:31:07 +0000370 default: ""
egernugfb09b7c2023-10-12 13:33:08 +0100371 example: my-module-set-tag
372 type: string
373 required:
374 - cmHandles
375 type: object
mpriyank6da95412023-06-29 16:56:11 +0100376 ErrorMessage:
niamhcorec1904c12021-10-11 16:38:53 +0100377 properties:
378 status:
379 type: string
380 message:
381 type: string
382 details:
383 type: string
mpriyank6da95412023-06-29 16:56:11 +0100384 title: Error
emacleeafb17362022-09-02 14:40:17 +0100385 type: object
mpriyank6da95412023-06-29 16:56:11 +0100386 DmiPluginRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100387 properties:
388 failedCreatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100389 items:
390 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100391 type: array
emacleeafb17362022-09-02 14:40:17 +0100392 failedUpdatedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100393 items:
394 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100395 type: array
emacleeafb17362022-09-02 14:40:17 +0100396 failedRemovedCmHandles:
emacleeafb17362022-09-02 14:40:17 +0100397 items:
398 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
mpriyank6da95412023-06-29 16:56:11 +0100399 type: array
egernugfb09b7c2023-10-12 13:33:08 +0100400 failedUpgradeCmHandles:
401 items:
402 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
403 type: array
emacleeafb17362022-09-02 14:40:17 +0100404 type: object
mpriyank6da95412023-06-29 16:56:11 +0100405 CmHandlerRegistrationErrorResponse:
emacleeafb17362022-09-02 14:40:17 +0100406 properties:
407 cmHandle:
emacleeafb17362022-09-02 14:40:17 +0100408 example: my-cm-handle
mpriyank6da95412023-06-29 16:56:11 +0100409 type: string
emacleeafb17362022-09-02 14:40:17 +0100410 errorCode:
emacleeafb17362022-09-02 14:40:17 +0100411 example: "00"
emacleeafb17362022-09-02 14:40:17 +0100412 type: string
mpriyank6da95412023-06-29 16:56:11 +0100413 errorText:
emacleeafb17362022-09-02 14:40:17 +0100414 example: Unknown error. <error-details>
mpriyank6da95412023-06-29 16:56:11 +0100415 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000416 type: object
mpriyank6da95412023-06-29 16:56:11 +0100417 CmHandleQueryParameters:
418 example:
419 cmHandleQueryParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100420 - conditionParameters:
421 - key: conditionParameters
422 - key: conditionParameters
423 conditionName: conditionName
424 - conditionParameters:
425 - key: conditionParameters
426 - key: conditionParameters
427 conditionName: conditionName
mpriyank6da95412023-06-29 16:56:11 +0100428 conditions:
mpriyank41c7d002023-08-22 13:17:46 +0100429 - name: name
430 conditionParameters:
431 - moduleName: my-module
432 - moduleName: my-module
433 - name: name
434 conditionParameters:
435 - moduleName: my-module
436 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000437 properties:
438 cmHandleQueryParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000439 items:
440 $ref: '#/components/schemas/ConditionProperties'
seanbeirne16e23582023-01-26 09:21:44 +0000441 type: array
mpriyank6da95412023-06-29 16:56:11 +0100442 conditions:
seanbeirne16e23582023-01-26 09:21:44 +0000443 deprecated: true
mpriyank6da95412023-06-29 16:56:11 +0100444 description: "not necessary, it is just for backward compatibility"
seanbeirne16e23582023-01-26 09:21:44 +0000445 items:
446 $ref: '#/components/schemas/OldConditionProperties'
mpriyank6da95412023-06-29 16:56:11 +0100447 type: array
448 title: Cm Handle query parameters for executing cm handle search
449 type: object
seanbeirne16e23582023-01-26 09:21:44 +0000450 ConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100451 example:
452 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100453 - key: conditionParameters
454 - key: conditionParameters
mpriyank6da95412023-06-29 16:56:11 +0100455 conditionName: conditionName
seanbeirne16e23582023-01-26 09:21:44 +0000456 properties:
457 conditionName:
458 type: string
459 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000460 items:
seanbeirne16e23582023-01-26 09:21:44 +0000461 additionalProperties:
462 type: string
mpriyank6da95412023-06-29 16:56:11 +0100463 type: object
464 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000465 OldConditionProperties:
mpriyank6da95412023-06-29 16:56:11 +0100466 deprecated: true
467 example:
468 name: name
469 conditionParameters:
mpriyank41c7d002023-08-22 13:17:46 +0100470 - moduleName: my-module
471 - moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000472 properties:
473 name:
474 type: string
475 conditionParameters:
seanbeirne16e23582023-01-26 09:21:44 +0000476 items:
477 $ref: '#/components/schemas/ModuleNameAsJsonObject'
mpriyank6da95412023-06-29 16:56:11 +0100478 type: array
seanbeirne16e23582023-01-26 09:21:44 +0000479 ModuleNameAsJsonObject:
mpriyank6da95412023-06-29 16:56:11 +0100480 example:
481 moduleName: my-module
seanbeirne16e23582023-01-26 09:21:44 +0000482 properties:
483 moduleName:
seanbeirne16e23582023-01-26 09:21:44 +0000484 example: my-module
mpriyank6da95412023-06-29 16:56:11 +0100485 type: string
seanbeirne16e23582023-01-26 09:21:44 +0000486 securitySchemes:
487 basicAuth:
seanbeirne16e23582023-01-26 09:21:44 +0000488 scheme: basic
mpriyank6da95412023-06-29 16:56:11 +0100489 type: http