Merge "Updating fetch all yang modules queries and tests"
[cps.git] / docs / api / swagger / ncmp / openapi.yaml
1 openapi: 3.0.1
2 info:
3   title: NCMP to CPS Proxy API
4   description: NCMP to CPS Proxy API
5   version: "1.0"
6 servers:
7 - url: /ncmp
8 paths:
9   /v1/cm-handles/{cm-handle}/node:
10     get:
11       tags:
12       - network-cm-proxy
13       summary: Get a node given a cm Handle and xpath
14       description: Get a node with an option to retrieve all the children for a given
15         cm Handle
16       operationId: getNodeByCmHandleAndXpath
17       parameters:
18       - name: cm-handle
19         in: path
20         description: "The identifier for a network function, network element, subnetwork\
21           \ or any other cm object by managed Network CM Proxy"
22         required: true
23         schema:
24           type: string
25       - name: xpath
26         in: query
27         description: xpath
28         required: false
29         schema:
30           type: string
31           default: /
32       - name: include-descendants
33         in: query
34         description: include-descendants
35         required: false
36         schema:
37           type: boolean
38           default: false
39       responses:
40         "200":
41           description: OK
42           content:
43             application/json:
44               schema:
45                 type: object
46         "400":
47           description: Bad Request
48           content:
49             application/json:
50               schema:
51                 $ref: '#/components/schemas/ErrorMessage'
52         "401":
53           description: Unauthorized
54           content:
55             application/json:
56               schema:
57                 $ref: '#/components/schemas/ErrorMessage'
58         "403":
59           description: Forbidden
60           content:
61             application/json:
62               schema:
63                 $ref: '#/components/schemas/ErrorMessage'
64         "404":
65           description: The specified resource was not found
66           content:
67             application/json:
68               schema:
69                 $ref: '#/components/schemas/ErrorMessage'
70       deprecated: true
71   /v1/cm-handles/{cm-handle}/list-node:
72     post:
73       tags:
74       - network-cm-proxy
75       summary: Add list-node child element(s)
76       description: Add one or more list-node child elements under existing node for
77         the given CM Handle
78       operationId: addListNodeElements
79       parameters:
80       - name: cm-handle
81         in: path
82         description: "The identifier for a network function, network element, subnetwork\
83           \ or any other cm object by managed Network CM Proxy"
84         required: true
85         schema:
86           type: string
87       - name: xpath
88         in: query
89         description: xpath
90         required: true
91         schema:
92           type: string
93       requestBody:
94         content:
95           application/json:
96             schema:
97               type: string
98         required: true
99       responses:
100         "201":
101           description: Created
102           content: {}
103         "400":
104           description: Bad Request
105           content:
106             application/json:
107               schema:
108                 $ref: '#/components/schemas/ErrorMessage'
109         "401":
110           description: Unauthorized
111           content:
112             application/json:
113               schema:
114                 $ref: '#/components/schemas/ErrorMessage'
115         "403":
116           description: Forbidden
117           content:
118             application/json:
119               schema:
120                 $ref: '#/components/schemas/ErrorMessage'
121         "404":
122           description: The specified resource was not found
123           content:
124             application/json:
125               schema:
126                 $ref: '#/components/schemas/ErrorMessage'
127       deprecated: true
128   /v1/cm-handles/{cm-handle}/nodes/query:
129     get:
130       tags:
131       - network-cm-proxy
132       summary: Query data nodes
133       description: Query nodes for the given cps path and cm Handle
134       operationId: queryNodesByCmHandleAndCpsPath
135       parameters:
136       - name: cm-handle
137         in: path
138         description: "The identifier for a network function, network element, subnetwork\
139           \ or any other cm object by managed Network CM Proxy"
140         required: true
141         schema:
142           type: string
143       - name: cps-path
144         in: query
145         description: cps-path
146         required: false
147         schema:
148           type: string
149           default: /
150       - name: include-descendants
151         in: query
152         description: include-descendants
153         required: false
154         schema:
155           type: boolean
156           default: false
157       responses:
158         "200":
159           description: OK
160           content:
161             application/json:
162               schema:
163                 type: object
164         "400":
165           description: Bad Request
166           content:
167             application/json:
168               schema:
169                 $ref: '#/components/schemas/ErrorMessage'
170         "401":
171           description: Unauthorized
172           content:
173             application/json:
174               schema:
175                 $ref: '#/components/schemas/ErrorMessage'
176         "403":
177           description: Forbidden
178           content:
179             application/json:
180               schema:
181                 $ref: '#/components/schemas/ErrorMessage'
182         "404":
183           description: The specified resource was not found
184           content:
185             application/json:
186               schema:
187                 $ref: '#/components/schemas/ErrorMessage'
188       deprecated: true
189   /v1/cm-handles/{cm-handle}/nodes:
190     put:
191       tags:
192       - network-cm-proxy
193       summary: Replace a node with descendants
194       description: Replace a node with descendants for the given cps path and cm Handle
195       operationId: replaceNode
196       parameters:
197       - name: cm-handle
198         in: path
199         description: "The identifier for a network function, network element, subnetwork\
200           \ or any other cm object by managed Network CM Proxy"
201         required: true
202         schema:
203           type: string
204       - name: xpath
205         in: query
206         description: xpath
207         required: false
208         schema:
209           type: string
210           default: /
211       requestBody:
212         content:
213           application/json:
214             schema:
215               type: string
216         required: true
217       responses:
218         "200":
219           description: OK
220           content:
221             application/json:
222               schema:
223                 type: object
224         "400":
225           description: Bad Request
226           content:
227             application/json:
228               schema:
229                 $ref: '#/components/schemas/ErrorMessage'
230         "401":
231           description: Unauthorized
232           content:
233             application/json:
234               schema:
235                 $ref: '#/components/schemas/ErrorMessage'
236         "403":
237           description: Forbidden
238           content:
239             application/json:
240               schema:
241                 $ref: '#/components/schemas/ErrorMessage'
242         "404":
243           description: The specified resource was not found
244           content:
245             application/json:
246               schema:
247                 $ref: '#/components/schemas/ErrorMessage'
248       deprecated: true
249     post:
250       tags:
251       - network-cm-proxy
252       summary: Create a node with descendants
253       description: Create a node with descendants for the given CM Handle; top level
254         or under existing node (requires xpath)
255       operationId: createNode
256       parameters:
257       - name: cm-handle
258         in: path
259         description: "The identifier for a network function, network element, subnetwork\
260           \ or any other cm object by managed Network CM Proxy"
261         required: true
262         schema:
263           type: string
264       - name: xpath
265         in: query
266         description: xpath
267         required: false
268         schema:
269           type: string
270           default: /
271       requestBody:
272         content:
273           application/json:
274             schema:
275               type: string
276         required: true
277       responses:
278         "201":
279           description: Created
280           content: {}
281         "400":
282           description: Bad Request
283           content:
284             application/json:
285               schema:
286                 $ref: '#/components/schemas/ErrorMessage'
287         "401":
288           description: Unauthorized
289           content:
290             application/json:
291               schema:
292                 $ref: '#/components/schemas/ErrorMessage'
293         "403":
294           description: Forbidden
295           content:
296             application/json:
297               schema:
298                 $ref: '#/components/schemas/ErrorMessage'
299         "404":
300           description: The specified resource was not found
301           content:
302             application/json:
303               schema:
304                 $ref: '#/components/schemas/ErrorMessage'
305       deprecated: true
306     patch:
307       tags:
308       - network-cm-proxy
309       summary: Update node leaves
310       description: Update node leaves for the given cps path and cm Handle
311       operationId: updateNodeLeaves
312       parameters:
313       - name: cm-handle
314         in: path
315         description: "The identifier for a network function, network element, subnetwork\
316           \ or any other cm object by managed Network CM Proxy"
317         required: true
318         schema:
319           type: string
320       - name: xpath
321         in: query
322         description: xpath
323         required: false
324         schema:
325           type: string
326           default: /
327       requestBody:
328         content:
329           application/json:
330             schema:
331               type: string
332         required: true
333       responses:
334         "200":
335           description: OK
336           content:
337             application/json:
338               schema:
339                 type: object
340         "400":
341           description: Bad Request
342           content:
343             application/json:
344               schema:
345                 $ref: '#/components/schemas/ErrorMessage'
346         "401":
347           description: Unauthorized
348           content:
349             application/json:
350               schema:
351                 $ref: '#/components/schemas/ErrorMessage'
352         "403":
353           description: Forbidden
354           content:
355             application/json:
356               schema:
357                 $ref: '#/components/schemas/ErrorMessage'
358         "404":
359           description: The specified resource was not found
360           content:
361             application/json:
362               schema:
363                 $ref: '#/components/schemas/ErrorMessage'
364       deprecated: true
365   /v1/ch:
366     post:
367       tags:
368       - network-cm-proxy
369       summary: DMI notifies NCMP of new CM Handles
370       description: "Register a DMI Plugin with any new, updated or removed CM Handles."
371       operationId: updateDmiPluginRegistration
372       requestBody:
373         content:
374           application/json:
375             schema:
376               $ref: '#/components/schemas/RestDmiPluginRegistration'
377         required: true
378       responses:
379         "201":
380           description: Created
381           content: {}
382         "400":
383           description: Bad Request
384           content:
385             application/json:
386               schema:
387                 $ref: '#/components/schemas/ErrorMessage'
388         "401":
389           description: Unauthorized
390           content:
391             application/json:
392               schema:
393                 $ref: '#/components/schemas/ErrorMessage'
394         "403":
395           description: Forbidden
396           content:
397             application/json:
398               schema:
399                 $ref: '#/components/schemas/ErrorMessage'
400   /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational/{resourceIdentifier}:
401     get:
402       tags:
403       - network-cm-proxy
404       summary: Get resource data from pass-through operational for cm handle
405       description: Get resource data from pass-through operational for given cm handle
406       operationId: getResourceDataOperationalForCmHandle
407       parameters:
408       - name: cm-handle
409         in: path
410         description: "The identifier for a network function, network element, subnetwork\
411           \ or any other cm object by managed Network CM Proxy"
412         required: true
413         schema:
414           type: string
415       - name: resourceIdentifier
416         in: path
417         description: Resource identifier to get/set the resource data
418         required: true
419         schema:
420           type: string
421       - name: Accept
422         in: header
423         description: "Accept parameter for response, if accept parameter is null,\
424           \ that means client can accept any format."
425         required: false
426         schema:
427           type: string
428           enum:
429           - application/json
430           - application/yang-data+json
431       - name: fields
432         in: query
433         description: Fields parameter to filter resource
434         required: false
435         schema:
436           type: string
437       - name: depth
438         in: query
439         description: Depth parameter for response
440         required: false
441         schema:
442           minimum: 1
443           type: integer
444       responses:
445         "200":
446           description: OK
447           content:
448             application/json:
449               schema:
450                 type: object
451         "400":
452           description: Bad Request
453           content:
454             application/json:
455               schema:
456                 $ref: '#/components/schemas/ErrorMessage'
457         "401":
458           description: Unauthorized
459           content:
460             application/json:
461               schema:
462                 $ref: '#/components/schemas/ErrorMessage'
463         "403":
464           description: Forbidden
465           content:
466             application/json:
467               schema:
468                 $ref: '#/components/schemas/ErrorMessage'
469         "404":
470           description: The specified resource was not found
471           content:
472             application/json:
473               schema:
474                 $ref: '#/components/schemas/ErrorMessage'
475   /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running/{resourceIdentifier}:
476     get:
477       tags:
478       - network-cm-proxy
479       summary: Get resource data from pass-through running for cm handle
480       description: Get resource data from pass-through running for given cm handle
481       operationId: getResourceDataRunningForCmHandle
482       parameters:
483       - name: cm-handle
484         in: path
485         description: "The identifier for a network function, network element, subnetwork\
486           \ or any other cm object by managed Network CM Proxy"
487         required: true
488         schema:
489           type: string
490       - name: resourceIdentifier
491         in: path
492         description: Resource identifier to get/set the resource data
493         required: true
494         schema:
495           type: string
496       - name: Accept
497         in: header
498         description: "Accept parameter for response, if accept parameter is null,\
499           \ that means client can accept any format."
500         required: false
501         schema:
502           type: string
503           enum:
504           - application/json
505           - application/yang-data+json
506       - name: fields
507         in: query
508         description: Fields parameter to filter resource
509         required: false
510         schema:
511           type: string
512       - name: depth
513         in: query
514         description: Depth parameter for response
515         required: false
516         schema:
517           minimum: 1
518           type: integer
519       responses:
520         "200":
521           description: OK
522           content:
523             application/json:
524               schema:
525                 type: object
526         "400":
527           description: Bad Request
528           content:
529             application/json:
530               schema:
531                 $ref: '#/components/schemas/ErrorMessage'
532         "401":
533           description: Unauthorized
534           content:
535             application/json:
536               schema:
537                 $ref: '#/components/schemas/ErrorMessage'
538         "403":
539           description: Forbidden
540           content:
541             application/json:
542               schema:
543                 $ref: '#/components/schemas/ErrorMessage'
544         "404":
545           description: The specified resource was not found
546           content:
547             application/json:
548               schema:
549                 $ref: '#/components/schemas/ErrorMessage'
550     post:
551       tags:
552       - network-cm-proxy
553       summary: create resource data from pass-through running for cm handle
554       description: create resource data from pass-through running for given cm handle
555       operationId: createResourceDataRunningForCmHandle
556       parameters:
557       - name: cm-handle
558         in: path
559         description: "The identifier for a network function, network element, subnetwork\
560           \ or any other cm object by managed Network CM Proxy"
561         required: true
562         schema:
563           type: string
564       - name: resourceIdentifier
565         in: path
566         description: Resource identifier to get/set the resource data
567         required: true
568         schema:
569           type: string
570       - name: Content-Type
571         in: header
572         description: "Content parameter for request, if content parameter is null,\
573           \ default value is application/json."
574         required: false
575         schema:
576           type: string
577           default: application/json
578       requestBody:
579         content:
580           application/json:
581             schema:
582               type: object
583           application/yang-data+json:
584             schema:
585               type: object
586         required: true
587       responses:
588         "201":
589           description: Created
590           content: {}
591         "400":
592           description: Bad Request
593           content:
594             application/json:
595               schema:
596                 $ref: '#/components/schemas/ErrorMessage'
597         "401":
598           description: Unauthorized
599           content:
600             application/json:
601               schema:
602                 $ref: '#/components/schemas/ErrorMessage'
603         "403":
604           description: Forbidden
605           content:
606             application/json:
607               schema:
608                 $ref: '#/components/schemas/ErrorMessage'
609         "404":
610           description: The specified resource was not found
611           content:
612             application/json:
613               schema:
614                 $ref: '#/components/schemas/ErrorMessage'
615 components:
616   schemas:
617     ErrorMessage:
618       title: Error
619       type: object
620       properties:
621         status:
622           type: string
623         message:
624           type: string
625         details:
626           type: string
627     RestDmiPluginRegistration:
628       type: object
629       properties:
630         dmiPlugin:
631           type: string
632           example: onap-dmi-plugin
633         createdCmHandles:
634           type: array
635           items:
636             $ref: '#/components/schemas/RestCmHandle'
637         updatedCmHandles:
638           type: array
639           items:
640             $ref: '#/components/schemas/RestCmHandle'
641         removedCmHandles:
642           type: array
643           items:
644             type: string
645     RestCmHandle:
646       required:
647       - cmHandle
648       type: object
649       properties:
650         cmHandle:
651           type: string
652           example: cmHandle123
653         cmHandleProperties:
654           $ref: '#/components/schemas/RestCmHandleAdditionalProperties'
655     RestCmHandleAdditionalProperties:
656       type: object
657       additionalProperties:
658         type: string
659         example: system-001