Release notes added for 3.4.6
[cps.git] / docs / api / swagger / ncmp / openapi-inventory.yaml
1 openapi: 3.0.3
2 info:
3   description: NCMP Inventory API
4   title: NCMP Inventory API
5   version: "1.0"
6 servers:
7 - url: /ncmpInventory
8 security:
9 - basicAuth: []
10 paths:
11   /v1/ch:
12     post:
13       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:
22         "200":
23           content: {}
24           description: No Content
25         "400":
26           content:
27             application/json:
28               example:
29                 status: 400 BAD_REQUEST
30                 message: Bad request error message
31                 details: Bad request error details
32               schema:
33                 $ref: '#/components/schemas/ErrorMessage'
34           description: Bad Request
35         "403":
36           content:
37             application/json:
38               example:
39                 status: 403
40                 message: Forbidden error message
41                 details: Forbidden error details
42               schema:
43                 $ref: '#/components/schemas/ErrorMessage'
44           description: Forbidden
45         "500":
46           content:
47             application/json:
48               example:
49                 failedCreatedCmHandles:
50                 - 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
59                 failedUpdatedCmHandles:
60                 - 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
69                 failedRemovedCmHandles:
70                 - 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
79               schema:
80                 $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
81           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.
84       summary: DMI notifies NCMP of new CM Handles
85       tags:
86       - network-cm-proxy-inventory
87   /v1/ch/cmHandles:
88     get:
89       description: Get all cm handle IDs for a registered DMI plugin
90       operationId: getAllCmHandleIdsForRegisteredDmi
91       parameters:
92       - 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
99       responses:
100         "200":
101           content:
102             application/json:
103               schema:
104                 items:
105                   type: string
106                 type: array
107           description: OK
108         "403":
109           content:
110             application/json:
111               example:
112                 status: 403
113                 message: Forbidden error message
114                 details: Forbidden error details
115               schema:
116                 $ref: '#/components/schemas/ErrorMessage'
117           description: Forbidden
118         "500":
119           content:
120             application/json:
121               example:
122                 status: 500
123                 message: Internal Server Error
124                 details: Internal Server Error occurred
125               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:
131       - network-cm-proxy-inventory
132   /v1/ch/searches:
133     post:
134       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'
142         required: true
143       responses:
144         "200":
145           content:
146             application/json:
147               schema:
148                 items:
149                   type: string
150                 type: array
151           description: OK
152         "403":
153           content:
154             application/json:
155               example:
156                 status: 403
157                 message: Forbidden error message
158                 details: Forbidden error details
159               schema:
160                 $ref: '#/components/schemas/ErrorMessage'
161           description: Forbidden
162         "500":
163           content:
164             application/json:
165               example:
166                 status: 500
167                 message: Internal Server Error
168                 details: Internal Server Error occurred
169               schema:
170                 $ref: '#/components/schemas/ErrorMessage'
171           description: Internal Server Error
172       summary: Query for CM Handle IDs
173       tags:
174       - network-cm-proxy-inventory
175 components:
176   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
199     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
219   schemas:
220     RestDmiPluginRegistration:
221       example:
222         updatedCmHandles:
223         - cmHandle: my-cm-handle
224           alternateId: my-alternate-id
225           publicCmHandleProperties:
226             key: my-property
227           cmHandleProperties:
228             key: my-property
229           moduleSetTag: my-module-set-tag
230           trustLevel: COMPLETE
231         - cmHandle: my-cm-handle
232           alternateId: my-alternate-id
233           publicCmHandleProperties:
234             key: my-property
235           cmHandleProperties:
236             key: my-property
237           moduleSetTag: my-module-set-tag
238           trustLevel: COMPLETE
239         createdCmHandles:
240         - cmHandle: my-cm-handle
241           alternateId: my-alternate-id
242           publicCmHandleProperties:
243             key: my-property
244           cmHandleProperties:
245             key: my-property
246           moduleSetTag: my-module-set-tag
247           trustLevel: COMPLETE
248         - cmHandle: my-cm-handle
249           alternateId: my-alternate-id
250           publicCmHandleProperties:
251             key: my-property
252           cmHandleProperties:
253             key: my-property
254           moduleSetTag: my-module-set-tag
255           trustLevel: COMPLETE
256         dmiPlugin: my-dmi-plugin
257         dmiModelPlugin: my-dmi-model-plugin
258         upgradedCmHandles:
259           cmHandles:
260           - my-cm-handle1
261           - my-cm-handle2
262           - my-cm-handle3
263           moduleSetTag: my-module-set-tag
264         dmiDataPlugin: my-dmi-data-plugin
265         removedCmHandles:
266         - my-cm-handle1
267         - my-cm-handle2
268         - my-cm-handle3
269       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:
292           - my-cm-handle1
293           - my-cm-handle2
294           - my-cm-handle3
295           items:
296             type: string
297           type: array
298         upgradedCmHandles:
299           $ref: '#/components/schemas/UpgradedCmHandles'
300       type: object
301     RestInputCmHandle:
302       example:
303         cmHandle: my-cm-handle
304         alternateId: my-alternate-id
305         publicCmHandleProperties:
306           key: my-property
307         cmHandleProperties:
308           key: my-property
309         moduleSetTag: my-module-set-tag
310         trustLevel: COMPLETE
311       properties:
312         cmHandle:
313           example: my-cm-handle
314           type: string
315         cmHandleProperties:
316           additionalProperties:
317             example: my-property
318             type: string
319           type: object
320         publicCmHandleProperties:
321           additionalProperties:
322             example: my-property
323             type: string
324           type: object
325         moduleSetTag:
326           example: my-module-set-tag
327           type: string
328         trustLevel:
329           enum:
330           - COMPLETE
331           - NONE
332           example: COMPLETE
333           type: string
334         alternateId:
335           example: my-alternate-id
336           type: string
337       required:
338       - cmHandle
339       type: object
340     RestCmHandleProperties:
341       additionalProperties:
342         example: my-property
343         type: string
344       type: object
345     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:
362           default: ""
363           example: my-module-set-tag
364           type: string
365       required:
366       - cmHandles
367       type: object
368     ErrorMessage:
369       properties:
370         status:
371           type: string
372         message:
373           type: string
374         details:
375           type: string
376       title: Error
377       type: object
378     DmiPluginRegistrationErrorResponse:
379       properties:
380         failedCreatedCmHandles:
381           items:
382             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
383           type: array
384         failedUpdatedCmHandles:
385           items:
386             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
387           type: array
388         failedRemovedCmHandles:
389           items:
390             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
391           type: array
392         failedUpgradeCmHandles:
393           items:
394             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
395           type: array
396       type: object
397     CmHandlerRegistrationErrorResponse:
398       properties:
399         cmHandle:
400           example: my-cm-handle
401           type: string
402         errorCode:
403           example: "00"
404           type: string
405         errorText:
406           example: Unknown error. <error-details>
407           type: string
408       type: object
409     CmHandleQueryParameters:
410       example:
411         cmHandleQueryParameters:
412         - conditionParameters:
413           - key: conditionParameters
414           - key: conditionParameters
415           conditionName: conditionName
416         - conditionParameters:
417           - key: conditionParameters
418           - key: conditionParameters
419           conditionName: conditionName
420         conditions:
421         - 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
429       properties:
430         cmHandleQueryParameters:
431           items:
432             $ref: '#/components/schemas/ConditionProperties'
433           type: array
434         conditions:
435           deprecated: true
436           description: "not necessary, it is just for backward compatibility"
437           items:
438             $ref: '#/components/schemas/OldConditionProperties'
439           type: array
440       title: Cm Handle query parameters for executing cm handle search
441       type: object
442     ConditionProperties:
443       example:
444         conditionParameters:
445         - key: conditionParameters
446         - key: conditionParameters
447         conditionName: conditionName
448       properties:
449         conditionName:
450           type: string
451         conditionParameters:
452           items:
453             additionalProperties:
454               type: string
455             type: object
456           type: array
457     OldConditionProperties:
458       deprecated: true
459       example:
460         name: name
461         conditionParameters:
462         - moduleName: my-module
463         - moduleName: my-module
464       properties:
465         name:
466           type: string
467         conditionParameters:
468           items:
469             $ref: '#/components/schemas/ModuleNameAsJsonObject'
470           type: array
471     ModuleNameAsJsonObject:
472       example:
473         moduleName: my-module
474       properties:
475         moduleName:
476           example: my-module
477           type: string
478   securitySchemes:
479     basicAuth:
480       scheme: basic
481       type: http