Merge "RTD change to document migration to Spring Boot 3.0"
[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         "401":
36           content:
37             application/json:
38               example:
39                 status: 401
40                 message: Unauthorized error message
41                 details: Unauthorized error details
42               schema:
43                 $ref: '#/components/schemas/ErrorMessage'
44           description: Unauthorized
45         "403":
46           content:
47             application/json:
48               example:
49                 status: 403
50                 message: Forbidden error message
51                 details: Forbidden error details
52               schema:
53                 $ref: '#/components/schemas/ErrorMessage'
54           description: Forbidden
55         "500":
56           content:
57             application/json:
58               example:
59                 failedCreatedCmHandles:
60                 - 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
69                 failedUpdatedCmHandles:
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 exist
76                 - cmHandle: my-cm-handle-03
77                   errorCode: "03"
78                   errorText: cm-handle has an invalid character(s) in id
79                 failedRemovedCmHandles:
80                 - 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
89               schema:
90                 $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
91           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.
94       summary: DMI notifies NCMP of new CM Handles
95       tags:
96       - network-cm-proxy-inventory
97   /v1/ch/cmHandles:
98     get:
99       description: Get all cm handle IDs for a registered DMI plugin
100       operationId: getAllCmHandleIdsForRegisteredDmi
101       parameters:
102       - 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
109       responses:
110         "200":
111           content:
112             application/json:
113               schema:
114                 items:
115                   type: string
116                 type: array
117           description: OK
118         "401":
119           content:
120             application/json:
121               example:
122                 status: 401
123                 message: Unauthorized error message
124                 details: Unauthorized error details
125               schema:
126                 $ref: '#/components/schemas/ErrorMessage'
127           description: Unauthorized
128         "403":
129           content:
130             application/json:
131               example:
132                 status: 403
133                 message: Forbidden error message
134                 details: Forbidden error details
135               schema:
136                 $ref: '#/components/schemas/ErrorMessage'
137           description: Forbidden
138         "500":
139           content:
140             application/json:
141               example:
142                 status: 500
143                 message: Internal Server Error
144                 details: Internal Server Error occurred
145               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:
151       - network-cm-proxy-inventory
152   /v1/ch/searches:
153     post:
154       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'
162         required: true
163       responses:
164         "200":
165           content:
166             application/json:
167               schema:
168                 items:
169                   type: string
170                 type: array
171           description: OK
172         "401":
173           content:
174             application/json:
175               example:
176                 status: 401
177                 message: Unauthorized error message
178                 details: Unauthorized error details
179               schema:
180                 $ref: '#/components/schemas/ErrorMessage'
181           description: Unauthorized
182         "403":
183           content:
184             application/json:
185               example:
186                 status: 403
187                 message: Forbidden error message
188                 details: Forbidden error details
189               schema:
190                 $ref: '#/components/schemas/ErrorMessage'
191           description: Forbidden
192         "500":
193           content:
194             application/json:
195               example:
196                 status: 500
197                 message: Internal Server Error
198                 details: Internal Server Error occurred
199               schema:
200                 $ref: '#/components/schemas/ErrorMessage'
201           description: Internal Server Error
202       summary: Query for CM Handle IDs
203       tags:
204       - network-cm-proxy-inventory
205 components:
206   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
259   schemas:
260     RestDmiPluginRegistration:
261       example:
262         updatedCmHandles:
263         - cmHandle: my-cm-handle
264           publicCmHandleProperties:
265             key: my-property
266           cmHandleProperties:
267             key: my-property
268           moduleSetTag: my-module-set-tag
269         - cmHandle: my-cm-handle
270           publicCmHandleProperties:
271             key: my-property
272           cmHandleProperties:
273             key: my-property
274           moduleSetTag: my-module-set-tag
275         createdCmHandles:
276         - cmHandle: my-cm-handle
277           publicCmHandleProperties:
278             key: my-property
279           cmHandleProperties:
280             key: my-property
281           moduleSetTag: my-module-set-tag
282         - cmHandle: my-cm-handle
283           publicCmHandleProperties:
284             key: my-property
285           cmHandleProperties:
286             key: my-property
287           moduleSetTag: my-module-set-tag
288         dmiPlugin: my-dmi-plugin
289         dmiModelPlugin: my-dmi-model-plugin
290         dmiDataPlugin: my-dmi-data-plugin
291         removedCmHandles:
292         - my-cm-handle1
293         - my-cm-handle2
294         - my-cm-handle3
295       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:
318           - my-cm-handle1
319           - my-cm-handle2
320           - my-cm-handle3
321           items:
322             type: string
323           type: array
324       type: object
325     RestInputCmHandle:
326       example:
327         cmHandle: my-cm-handle
328         publicCmHandleProperties:
329           key: my-property
330         cmHandleProperties:
331           key: my-property
332         moduleSetTag: my-module-set-tag
333       properties:
334         cmHandle:
335           example: my-cm-handle
336           type: string
337         cmHandleProperties:
338           additionalProperties:
339             example: my-property
340             type: string
341           type: object
342         publicCmHandleProperties:
343           additionalProperties:
344             example: my-property
345             type: string
346           type: object
347         moduleSetTag:
348           example: my-module-set-tag
349           type: string
350       required:
351       - cmHandle
352       type: object
353     RestCmHandleProperties:
354       additionalProperties:
355         example: my-property
356         type: string
357       type: object
358     ErrorMessage:
359       properties:
360         status:
361           type: string
362         message:
363           type: string
364         details:
365           type: string
366       title: Error
367       type: object
368     DmiPluginRegistrationErrorResponse:
369       properties:
370         failedCreatedCmHandles:
371           items:
372             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
373           type: array
374         failedUpdatedCmHandles:
375           items:
376             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
377           type: array
378         failedRemovedCmHandles:
379           items:
380             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
381           type: array
382       type: object
383     CmHandlerRegistrationErrorResponse:
384       properties:
385         cmHandle:
386           example: my-cm-handle
387           type: string
388         errorCode:
389           example: "00"
390           type: string
391         errorText:
392           example: Unknown error. <error-details>
393           type: string
394       type: object
395     CmHandleQueryParameters:
396       example:
397         cmHandleQueryParameters:
398         - conditionParameters:
399           - key: conditionParameters
400           - key: conditionParameters
401           conditionName: conditionName
402         - conditionParameters:
403           - key: conditionParameters
404           - key: conditionParameters
405           conditionName: conditionName
406         conditions:
407         - 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
415       properties:
416         cmHandleQueryParameters:
417           items:
418             $ref: '#/components/schemas/ConditionProperties'
419           type: array
420         conditions:
421           deprecated: true
422           description: "not necessary, it is just for backward compatibility"
423           items:
424             $ref: '#/components/schemas/OldConditionProperties'
425           type: array
426       title: Cm Handle query parameters for executing cm handle search
427       type: object
428     ConditionProperties:
429       example:
430         conditionParameters:
431         - key: conditionParameters
432         - key: conditionParameters
433         conditionName: conditionName
434       properties:
435         conditionName:
436           type: string
437         conditionParameters:
438           items:
439             additionalProperties:
440               type: string
441             type: object
442           type: array
443     OldConditionProperties:
444       deprecated: true
445       example:
446         name: name
447         conditionParameters:
448         - moduleName: my-module
449         - moduleName: my-module
450       properties:
451         name:
452           type: string
453         conditionParameters:
454           items:
455             $ref: '#/components/schemas/ModuleNameAsJsonObject'
456           type: array
457     ModuleNameAsJsonObject:
458       example:
459         moduleName: my-module
460       properties:
461         moduleName:
462           example: my-module
463           type: string
464   securitySchemes:
465     basicAuth:
466       scheme: basic
467       type: http