Merge "Refactor WriteSubJobSpec to make use of test REST endpoint of write job"
[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: 3.6.3
6 servers:
7 - url: /ncmpInventory
8 paths:
9   /v1/ch:
10     post:
11       description: "Register a DMI Plugin with any new, updated or removed CM Handles."
12       operationId: updateDmiPluginRegistration
13       requestBody:
14         content:
15           application/json:
16             schema:
17               $ref: '#/components/schemas/RestDmiPluginRegistration'
18         required: true
19       responses:
20         "200":
21           content: {}
22           description: No Content
23         "400":
24           content:
25             application/json:
26               example:
27                 status: 400
28                 message: Bad request error message
29                 details: Bad request error details
30               schema:
31                 $ref: '#/components/schemas/ErrorMessage'
32           description: Bad Request
33         "403":
34           content:
35             application/json:
36               example:
37                 status: 403
38                 message: Forbidden error message
39                 details: Forbidden error details
40               schema:
41                 $ref: '#/components/schemas/ErrorMessage'
42           description: Forbidden
43         "500":
44           content:
45             application/json:
46               example:
47                 failedCreatedCmHandles:
48                 - cmHandle: my-cm-handle-01
49                   errorCode: "00"
50                   errorText: Unknown error. <error-details>
51                 - cmHandle: my-cm-handle-02
52                   errorCode: "01"
53                   errorText: cm-handle already exists
54                 - cmHandle: my-cm-handle-03
55                   errorCode: "03"
56                   errorText: cm-handle has an invalid character(s) in id
57                 failedUpdatedCmHandles:
58                 - cmHandle: my-cm-handle-01
59                   errorCode: "00"
60                   errorText: Unknown error. <error-details>
61                 - cmHandle: my-cm-handle-02
62                   errorCode: "02"
63                   errorText: cm-handle does not exist
64                 - cmHandle: my-cm-handle-03
65                   errorCode: "03"
66                   errorText: cm-handle has an invalid character(s) in id
67                 failedRemovedCmHandles:
68                 - cmHandle: my-cm-handle-01
69                   errorCode: "00"
70                   errorText: Unknown error. <error-details>
71                 - cmHandle: my-cm-handle-02
72                   errorCode: "02"
73                   errorText: cm-handle does not exists
74                 - cmHandle: my-cm-handle-03
75                   errorCode: "03"
76                   errorText: cm-handle has an invalid character(s) in id
77               schema:
78                 $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
79           description: Partial or Complete failure. The error details are provided
80             in the response body and all supported error codes are documented in the
81             example.
82       summary: DMI notifies NCMP of new CM Handles
83       tags:
84       - network-cm-proxy-inventory
85   /v1/ch/cmHandles:
86     get:
87       description: Get all cm handle references for a registered DMI plugin
88       operationId: getAllCmHandleReferencesForRegisteredDmi
89       parameters:
90       - description: dmi-plugin-identifier
91         in: query
92         name: dmi-plugin-identifier
93         required: true
94         schema:
95           example: my-dmi-plugin
96           type: string
97       - description: Boolean parameter to determine if returned value(s) will be cm
98           handle ids or alternate ids for a given query
99         in: query
100         name: outputAlternateId
101         required: false
102         schema:
103           default: false
104           type: boolean
105       responses:
106         "200":
107           content:
108             application/json:
109               schema:
110                 items:
111                   type: string
112                 type: array
113           description: OK
114         "403":
115           content:
116             application/json:
117               example:
118                 status: 403
119                 message: Forbidden error message
120                 details: Forbidden error details
121               schema:
122                 $ref: '#/components/schemas/ErrorMessage'
123           description: Forbidden
124         "500":
125           content:
126             application/json:
127               example:
128                 status: 500
129                 message: Internal Server Error
130                 details: Internal Server Error occurred
131               schema:
132                 $ref: '#/components/schemas/ErrorMessage'
133           description: Internal Server Error
134       summary: "Get all cm handle references for a registered DMI plugin (DMI plugin,\
135         \ DMI data plugin, DMI model plugin)"
136       tags:
137       - network-cm-proxy-inventory
138   /v1/ch/searches:
139     post:
140       description: "Query and get cm handle references for additional properties,\
141         \ public properties and registered DMI plugin (DMI plugin, DMI data plugin,\
142         \ DMI model plugin)."
143       operationId: searchCmHandleIds
144       parameters:
145       - description: Boolean parameter to determine if returned value(s) will be cm
146           handle ids or alternate ids for a given query
147         in: query
148         name: outputAlternateId
149         required: false
150         schema:
151           default: false
152           type: boolean
153       requestBody:
154         content:
155           application/json:
156             schema:
157               $ref: '#/components/schemas/CmHandleQueryParameters'
158         required: true
159       responses:
160         "200":
161           content:
162             application/json:
163               schema:
164                 items:
165                   type: string
166                 type: array
167           description: OK
168         "403":
169           content:
170             application/json:
171               example:
172                 status: 403
173                 message: Forbidden error message
174                 details: Forbidden error details
175               schema:
176                 $ref: '#/components/schemas/ErrorMessage'
177           description: Forbidden
178         "500":
179           content:
180             application/json:
181               example:
182                 status: 500
183                 message: Internal Server Error
184                 details: Internal Server Error occurred
185               schema:
186                 $ref: '#/components/schemas/ErrorMessage'
187           description: Internal Server Error
188       summary: Query for CM Handle IDs
189       tags:
190       - network-cm-proxy-inventory
191   /v1/ch/searchCmHandles:
192     post:
193       description: Execute cm handle query search and return a list of cm handle details.
194         Any number of conditions can be applied. To be included in the result a cm-handle
195         must fulfill ALL the conditions. An empty collection will be returned in the
196         case that the cm handle does not match a condition. For more on cm handle
197         query search please refer to <a href="https://docs.onap.org/projects/onap-cps/en/latest/ncmp-cmhandle-querying.html">cm
198         handle query search Read the Docs</a>.<br/>By supplying a CPS Path it is possible
199         to query on any data related to the cm handle. For more on CPS Path please
200         refer to <a href="https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html">CPS
201         Path Read the Docs</a>. The cm handle ancestor is automatically returned for
202         this query.
203       operationId: searchCmHandles
204       parameters:
205       - description: Whether to include additional properties in the response.
206         in: query
207         name: includeCmHandlePropertiesInQuery
208         required: false
209         schema:
210           type: boolean
211       requestBody:
212         content:
213           application/json:
214             schema:
215               $ref: '#/components/schemas/CmHandleQueryParameters'
216         required: true
217       responses:
218         "200":
219           content:
220             application/json:
221               schema:
222                 items:
223                   $ref: '#/components/schemas/RestOutputCmHandle'
224                 type: array
225           description: OK
226         "400":
227           content:
228             application/json:
229               example:
230                 status: 400
231                 message: Bad request error message
232                 details: Bad request error details
233               schema:
234                 $ref: '#/components/schemas/ErrorMessage'
235           description: Bad Request
236         "403":
237           content:
238             application/json:
239               example:
240                 status: 403
241                 message: Forbidden error message
242                 details: Forbidden error details
243               schema:
244                 $ref: '#/components/schemas/ErrorMessage'
245           description: Forbidden
246         "500":
247           content:
248             application/json:
249               example:
250                 status: 500
251                 message: Internal Server Error
252                 details: Internal Server Error occurred
253               schema:
254                 $ref: '#/components/schemas/ErrorMessage'
255           description: Internal Server Error
256       summary: Query Cm Handles for a requested DMI Service
257       tags:
258       - network-cm-proxy-inventory
259 components:
260   parameters:
261     dmiPluginIdentifierInQuery:
262       description: dmi-plugin-identifier
263       in: query
264       name: dmi-plugin-identifier
265       required: true
266       schema:
267         example: my-dmi-plugin
268         type: string
269     outputAlternateIdOptionInQuery:
270       description: Boolean parameter to determine if returned value(s) will be cm
271         handle ids or alternate ids for a given query
272       in: query
273       name: outputAlternateId
274       required: false
275       schema:
276         default: false
277         type: boolean
278   responses:
279     NoContent:
280       content: {}
281       description: No Content
282     BadRequest:
283       content:
284         application/json:
285           example:
286             status: 400
287             message: Bad request error message
288             details: Bad request error details
289           schema:
290             $ref: '#/components/schemas/ErrorMessage'
291       description: Bad Request
292     Forbidden:
293       content:
294         application/json:
295           example:
296             status: 403
297             message: Forbidden error message
298             details: Forbidden error details
299           schema:
300             $ref: '#/components/schemas/ErrorMessage'
301       description: Forbidden
302     InternalServerError:
303       content:
304         application/json:
305           example:
306             status: 500
307             message: Internal Server Error
308             details: Internal Server Error occurred
309           schema:
310             $ref: '#/components/schemas/ErrorMessage'
311       description: Internal Server Error
312   schemas:
313     RestDmiPluginRegistration:
314       example:
315         updatedCmHandles:
316         - cmHandle: my-cm-handle
317           alternateId: "Subnetwork=Europe,ManagedElement=X123"
318           dataProducerIdentifier: my-data-producer-identifier
319           publicCmHandleProperties:
320             key: my-property
321           cmHandleProperties:
322             key: my-property
323           moduleSetTag: my-module-set-tag
324           trustLevel: COMPLETE
325         - cmHandle: my-cm-handle
326           alternateId: "Subnetwork=Europe,ManagedElement=X123"
327           dataProducerIdentifier: my-data-producer-identifier
328           publicCmHandleProperties:
329             key: my-property
330           cmHandleProperties:
331             key: my-property
332           moduleSetTag: my-module-set-tag
333           trustLevel: COMPLETE
334         createdCmHandles:
335         - cmHandle: my-cm-handle
336           alternateId: "Subnetwork=Europe,ManagedElement=X123"
337           dataProducerIdentifier: my-data-producer-identifier
338           publicCmHandleProperties:
339             key: my-property
340           cmHandleProperties:
341             key: my-property
342           moduleSetTag: my-module-set-tag
343           trustLevel: COMPLETE
344         - cmHandle: my-cm-handle
345           alternateId: "Subnetwork=Europe,ManagedElement=X123"
346           dataProducerIdentifier: my-data-producer-identifier
347           publicCmHandleProperties:
348             key: my-property
349           cmHandleProperties:
350             key: my-property
351           moduleSetTag: my-module-set-tag
352           trustLevel: COMPLETE
353         dmiPlugin: my-dmi-plugin
354         dmiModelPlugin: my-dmi-model-plugin
355         upgradedCmHandles:
356           cmHandles:
357           - my-cm-handle1
358           - my-cm-handle2
359           - my-cm-handle3
360           moduleSetTag: my-module-set-tag
361         dmiDataPlugin: my-dmi-data-plugin
362         removedCmHandles:
363         - my-cm-handle1
364         - my-cm-handle2
365         - my-cm-handle3
366       properties:
367         dmiPlugin:
368           default: ""
369           example: my-dmi-plugin
370           type: string
371         dmiDataPlugin:
372           default: ""
373           example: my-dmi-data-plugin
374           type: string
375         dmiModelPlugin:
376           default: ""
377           example: my-dmi-model-plugin
378           type: string
379         createdCmHandles:
380           items:
381             $ref: '#/components/schemas/RestInputCmHandle'
382           type: array
383         updatedCmHandles:
384           items:
385             $ref: '#/components/schemas/RestInputCmHandle'
386           type: array
387         removedCmHandles:
388           example:
389           - my-cm-handle1
390           - my-cm-handle2
391           - my-cm-handle3
392           items:
393             type: string
394           type: array
395         upgradedCmHandles:
396           $ref: '#/components/schemas/UpgradedCmHandles'
397       type: object
398     RestInputCmHandle:
399       example:
400         cmHandle: my-cm-handle
401         alternateId: "Subnetwork=Europe,ManagedElement=X123"
402         dataProducerIdentifier: my-data-producer-identifier
403         publicCmHandleProperties:
404           key: my-property
405         cmHandleProperties:
406           key: my-property
407         moduleSetTag: my-module-set-tag
408         trustLevel: COMPLETE
409       properties:
410         cmHandle:
411           example: my-cm-handle
412           type: string
413         cmHandleProperties:
414           additionalProperties:
415             example: my-property
416             type: string
417           type: object
418         publicCmHandleProperties:
419           additionalProperties:
420             example: my-property
421             type: string
422           type: object
423         moduleSetTag:
424           example: my-module-set-tag
425           type: string
426         trustLevel:
427           enum:
428           - COMPLETE
429           - NONE
430           example: COMPLETE
431           type: string
432         alternateId:
433           example: "Subnetwork=Europe,ManagedElement=X123"
434           type: string
435         dataProducerIdentifier:
436           example: my-data-producer-identifier
437           type: string
438       required:
439       - cmHandle
440       type: object
441     UpgradedCmHandles:
442       example:
443         cmHandles:
444         - my-cm-handle1
445         - my-cm-handle2
446         - my-cm-handle3
447         moduleSetTag: my-module-set-tag
448       properties:
449         cmHandles:
450           example:
451           - my-cm-handle1
452           - my-cm-handle2
453           - my-cm-handle3
454           items:
455             type: string
456           type: array
457         moduleSetTag:
458           default: ""
459           example: my-module-set-tag
460           type: string
461       required:
462       - cmHandles
463       type: object
464     ErrorMessage:
465       example:
466         details: details
467         message: message
468         status: status
469       properties:
470         status:
471           type: string
472         message:
473           type: string
474         details:
475           type: string
476       title: Error
477       type: object
478     DmiPluginRegistrationErrorResponse:
479       example:
480         failedCreatedCmHandles:
481         - cmHandle: my-cm-handle
482           errorText: Unknown error. <error-details>
483           errorCode: "00"
484         - cmHandle: my-cm-handle
485           errorText: Unknown error. <error-details>
486           errorCode: "00"
487         failedUpgradeCmHandles:
488         - cmHandle: my-cm-handle
489           errorText: Unknown error. <error-details>
490           errorCode: "00"
491         - cmHandle: my-cm-handle
492           errorText: Unknown error. <error-details>
493           errorCode: "00"
494         failedRemovedCmHandles:
495         - cmHandle: my-cm-handle
496           errorText: Unknown error. <error-details>
497           errorCode: "00"
498         - cmHandle: my-cm-handle
499           errorText: Unknown error. <error-details>
500           errorCode: "00"
501         failedUpdatedCmHandles:
502         - cmHandle: my-cm-handle
503           errorText: Unknown error. <error-details>
504           errorCode: "00"
505         - cmHandle: my-cm-handle
506           errorText: Unknown error. <error-details>
507           errorCode: "00"
508       properties:
509         failedCreatedCmHandles:
510           items:
511             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
512           type: array
513         failedUpdatedCmHandles:
514           items:
515             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
516           type: array
517         failedRemovedCmHandles:
518           items:
519             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
520           type: array
521         failedUpgradeCmHandles:
522           items:
523             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
524           type: array
525       type: object
526     CmHandlerRegistrationErrorResponse:
527       example:
528         cmHandle: my-cm-handle
529         errorText: Unknown error. <error-details>
530         errorCode: "00"
531       properties:
532         cmHandle:
533           example: my-cm-handle
534           type: string
535         errorCode:
536           example: "00"
537           type: string
538         errorText:
539           example: Unknown error. <error-details>
540           type: string
541       type: object
542     CmHandleQueryParameters:
543       example:
544         cmHandleQueryParameters:
545         - conditionParameters:
546           - key: conditionParameters
547           - key: conditionParameters
548           conditionName: conditionName
549         - conditionParameters:
550           - key: conditionParameters
551           - key: conditionParameters
552           conditionName: conditionName
553         conditions:
554         - name: name
555           conditionParameters:
556           - moduleName: my-module
557           - moduleName: my-module
558         - name: name
559           conditionParameters:
560           - moduleName: my-module
561           - moduleName: my-module
562       properties:
563         cmHandleQueryParameters:
564           items:
565             $ref: '#/components/schemas/ConditionProperties'
566           type: array
567         conditions:
568           deprecated: true
569           description: "not necessary, it is just for backward compatibility"
570           items:
571             $ref: '#/components/schemas/OldConditionProperties'
572           type: array
573       title: Cm Handle query parameters for executing cm handle search
574       type: object
575     ConditionProperties:
576       example:
577         conditionParameters:
578         - key: conditionParameters
579         - key: conditionParameters
580         conditionName: conditionName
581       properties:
582         conditionName:
583           type: string
584         conditionParameters:
585           items:
586             additionalProperties:
587               type: string
588             type: object
589           type: array
590     OldConditionProperties:
591       deprecated: true
592       example:
593         name: name
594         conditionParameters:
595         - moduleName: my-module
596         - moduleName: my-module
597       properties:
598         name:
599           type: string
600         conditionParameters:
601           items:
602             $ref: '#/components/schemas/ModuleNameAsJsonObject'
603           type: array
604     ModuleNameAsJsonObject:
605       example:
606         moduleName: my-module
607       properties:
608         moduleName:
609           example: my-module
610           type: string
611     RestOutputCmHandle:
612       example:
613         cmHandle: my-cm-handle1
614         alternateId: "Subnetwork=Europe,ManagedElement=X123"
615         dataProducerIdentifier: my-data-producer-identifier
616         publicCmHandleProperties:
617         - key: 3gpp Type
618         - key: 3gpp Type
619         cmHandleProperties:
620           key: 3gpp Type
621         state:
622           dataSyncEnabled: false
623           dataSyncState:
624             running:
625               lastSyncTime: 2022-12-31T20:30:40.000+0000
626               syncState: NONE_REQUESTED
627             operational:
628               lastSyncTime: 2022-12-31T20:30:40.000+0000
629               syncState: NONE_REQUESTED
630           cmHandleState: ADVISED
631           lockReason:
632             reason: LOCKED_MISBEHAVING
633             details: locked due to failure in module sync
634           lastUpdateTime: 2022-12-31T20:30:40.000+0000
635         trustLevel: COMPLETE
636         moduleSetTag: my-module-set-tag
637       properties:
638         cmHandle:
639           example: my-cm-handle1
640           type: string
641         publicCmHandleProperties:
642           items:
643             additionalProperties:
644               example: 3gpp Type
645               type: string
646             type: object
647           nullable: true
648           type: array
649         cmHandleProperties:
650           additionalProperties:
651             example: 3gpp Type
652             type: string
653           type: object
654         state:
655           $ref: '#/components/schemas/CmHandleCompositeState'
656         trustLevel:
657           description: Current trust level of the relevant CM handle ID.
658           example: COMPLETE
659           type: string
660         moduleSetTag:
661           example: my-module-set-tag
662           type: string
663         alternateId:
664           example: "Subnetwork=Europe,ManagedElement=X123"
665           type: string
666         dataProducerIdentifier:
667           example: my-data-producer-identifier
668           type: string
669       title: CM handle Details
670       type: object
671     CmHandleCompositeState:
672       example:
673         dataSyncEnabled: false
674         dataSyncState:
675           running:
676             lastSyncTime: 2022-12-31T20:30:40.000+0000
677             syncState: NONE_REQUESTED
678           operational:
679             lastSyncTime: 2022-12-31T20:30:40.000+0000
680             syncState: NONE_REQUESTED
681         cmHandleState: ADVISED
682         lockReason:
683           reason: LOCKED_MISBEHAVING
684           details: locked due to failure in module sync
685         lastUpdateTime: 2022-12-31T20:30:40.000+0000
686       properties:
687         cmHandleState:
688           example: ADVISED
689           type: string
690         lockReason:
691           $ref: '#/components/schemas/lock-reason'
692         lastUpdateTime:
693           example: 2022-12-31T20:30:40.000+0000
694           type: string
695         dataSyncEnabled:
696           example: false
697           type: boolean
698         dataSyncState:
699           $ref: '#/components/schemas/dataStores'
700       type: object
701     lock-reason:
702       example:
703         reason: LOCKED_MISBEHAVING
704         details: locked due to failure in module sync
705       properties:
706         reason:
707           example: LOCKED_MISBEHAVING
708           type: string
709         details:
710           example: locked due to failure in module sync
711           type: string
712       type: object
713     dataStores:
714       example:
715         running:
716           lastSyncTime: 2022-12-31T20:30:40.000+0000
717           syncState: NONE_REQUESTED
718         operational:
719           lastSyncTime: 2022-12-31T20:30:40.000+0000
720           syncState: NONE_REQUESTED
721       properties:
722         operational:
723           $ref: '#/components/schemas/sync-state'
724         running:
725           $ref: '#/components/schemas/sync-state'
726       type: object
727     sync-state:
728       example:
729         lastSyncTime: 2022-12-31T20:30:40.000+0000
730         syncState: NONE_REQUESTED
731       properties:
732         syncState:
733           example: NONE_REQUESTED
734           type: string
735         lastSyncTime:
736           example: 2022-12-31T20:30:40.000+0000
737           type: string
738       type: object
739     CmHandleTrustLevel:
740       description: Current trust level of the relevant CM handle ID.
741       example: COMPLETE
742       type: string