Modify the get cmHandle api to return dataProducerIdentifier, moduleSetTag, and alter...
[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           dataProducerIdentifier: my-data-producer-identifier
226           publicCmHandleProperties:
227             key: my-property
228           cmHandleProperties:
229             key: my-property
230           moduleSetTag: my-module-set-tag
231           trustLevel: COMPLETE
232         - cmHandle: my-cm-handle
233           alternateId: my-alternate-id
234           dataProducerIdentifier: my-data-producer-identifier
235           publicCmHandleProperties:
236             key: my-property
237           cmHandleProperties:
238             key: my-property
239           moduleSetTag: my-module-set-tag
240           trustLevel: COMPLETE
241         createdCmHandles:
242         - cmHandle: my-cm-handle
243           alternateId: my-alternate-id
244           dataProducerIdentifier: my-data-producer-identifier
245           publicCmHandleProperties:
246             key: my-property
247           cmHandleProperties:
248             key: my-property
249           moduleSetTag: my-module-set-tag
250           trustLevel: COMPLETE
251         - cmHandle: my-cm-handle
252           alternateId: my-alternate-id
253           dataProducerIdentifier: my-data-producer-identifier
254           publicCmHandleProperties:
255             key: my-property
256           cmHandleProperties:
257             key: my-property
258           moduleSetTag: my-module-set-tag
259           trustLevel: COMPLETE
260         dmiPlugin: my-dmi-plugin
261         dmiModelPlugin: my-dmi-model-plugin
262         upgradedCmHandles:
263           cmHandles:
264           - my-cm-handle1
265           - my-cm-handle2
266           - my-cm-handle3
267           moduleSetTag: my-module-set-tag
268         dmiDataPlugin: my-dmi-data-plugin
269         removedCmHandles:
270         - my-cm-handle1
271         - my-cm-handle2
272         - my-cm-handle3
273       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:
296           - my-cm-handle1
297           - my-cm-handle2
298           - my-cm-handle3
299           items:
300             type: string
301           type: array
302         upgradedCmHandles:
303           $ref: '#/components/schemas/UpgradedCmHandles'
304       type: object
305     RestInputCmHandle:
306       example:
307         cmHandle: my-cm-handle
308         alternateId: my-alternate-id
309         dataProducerIdentifier: my-data-producer-identifier
310         publicCmHandleProperties:
311           key: my-property
312         cmHandleProperties:
313           key: my-property
314         moduleSetTag: my-module-set-tag
315         trustLevel: COMPLETE
316       properties:
317         cmHandle:
318           example: my-cm-handle
319           type: string
320         cmHandleProperties:
321           additionalProperties:
322             example: my-property
323             type: string
324           type: object
325         publicCmHandleProperties:
326           additionalProperties:
327             example: my-property
328             type: string
329           type: object
330         moduleSetTag:
331           example: my-module-set-tag
332           type: string
333         trustLevel:
334           enum:
335           - COMPLETE
336           - NONE
337           example: COMPLETE
338           type: string
339         alternateId:
340           example: my-alternate-id
341           type: string
342         dataProducerIdentifier:
343           example: my-data-producer-identifier
344           type: string
345       required:
346       - cmHandle
347       type: object
348     RestCmHandleProperties:
349       additionalProperties:
350         example: my-property
351         type: string
352       type: object
353     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:
370           default: ""
371           example: my-module-set-tag
372           type: string
373       required:
374       - cmHandles
375       type: object
376     ErrorMessage:
377       properties:
378         status:
379           type: string
380         message:
381           type: string
382         details:
383           type: string
384       title: Error
385       type: object
386     DmiPluginRegistrationErrorResponse:
387       properties:
388         failedCreatedCmHandles:
389           items:
390             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
391           type: array
392         failedUpdatedCmHandles:
393           items:
394             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
395           type: array
396         failedRemovedCmHandles:
397           items:
398             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
399           type: array
400         failedUpgradeCmHandles:
401           items:
402             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
403           type: array
404       type: object
405     CmHandlerRegistrationErrorResponse:
406       properties:
407         cmHandle:
408           example: my-cm-handle
409           type: string
410         errorCode:
411           example: "00"
412           type: string
413         errorText:
414           example: Unknown error. <error-details>
415           type: string
416       type: object
417     CmHandleQueryParameters:
418       example:
419         cmHandleQueryParameters:
420         - conditionParameters:
421           - key: conditionParameters
422           - key: conditionParameters
423           conditionName: conditionName
424         - conditionParameters:
425           - key: conditionParameters
426           - key: conditionParameters
427           conditionName: conditionName
428         conditions:
429         - 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
437       properties:
438         cmHandleQueryParameters:
439           items:
440             $ref: '#/components/schemas/ConditionProperties'
441           type: array
442         conditions:
443           deprecated: true
444           description: "not necessary, it is just for backward compatibility"
445           items:
446             $ref: '#/components/schemas/OldConditionProperties'
447           type: array
448       title: Cm Handle query parameters for executing cm handle search
449       type: object
450     ConditionProperties:
451       example:
452         conditionParameters:
453         - key: conditionParameters
454         - key: conditionParameters
455         conditionName: conditionName
456       properties:
457         conditionName:
458           type: string
459         conditionParameters:
460           items:
461             additionalProperties:
462               type: string
463             type: object
464           type: array
465     OldConditionProperties:
466       deprecated: true
467       example:
468         name: name
469         conditionParameters:
470         - moduleName: my-module
471         - moduleName: my-module
472       properties:
473         name:
474           type: string
475         conditionParameters:
476           items:
477             $ref: '#/components/schemas/ModuleNameAsJsonObject'
478           type: array
479     ModuleNameAsJsonObject:
480       example:
481         moduleName: my-module
482       properties:
483         moduleName:
484           example: my-module
485           type: string
486   securitySchemes:
487     basicAuth:
488       scheme: basic
489       type: http