Log all incoming HTTP requests to NCMP with Authorization Header
[cps.git] / docs / api / swagger / cps / openapi.yaml
1 openapi: 3.0.3
2 info:
3   contact:
4     email: onap-discuss@lists.onap.org
5     name: ONAP
6     url: https://onap.readthedocs.io
7   description: Configuration Persistence Service is a Model Driven Generic Database
8   license:
9     name: Apache 2.0
10     url: http://www.apache.org/licenses/LICENSE-2.0
11   title: ONAP Open API v3 Configuration Persistence Service
12   version: 1.0.0
13   x-planned-retirement-date: "202212"
14   x-component: Modeling
15   x-logo:
16     url: cps_logo.png
17 servers:
18 - url: /cps/api
19 security:
20 - basicAuth: []
21 tags:
22 - description: cps Admin
23   name: cps-admin
24 - description: cps Data
25   name: cps-data
26 paths:
27   /v1/dataspaces:
28     post:
29       deprecated: true
30       description: Create a new dataspace
31       operationId: createDataspace
32       parameters:
33       - description: dataspace-name
34         in: query
35         name: dataspace-name
36         required: true
37         schema:
38           example: my-dataspace
39           type: string
40       responses:
41         "201":
42           content:
43             text/plain:
44               schema:
45                 example: my-resource
46                 type: string
47           description: Created
48         "400":
49           content:
50             application/json:
51               example:
52                 status: 400
53                 message: Bad Request
54                 details: The provided request is not valid
55               schema:
56                 $ref: '#/components/schemas/ErrorMessage'
57           description: Bad Request
58         "401":
59           content:
60             application/json:
61               example:
62                 status: 401
63                 message: Unauthorized request
64                 details: This request is unauthorized
65               schema:
66                 $ref: '#/components/schemas/ErrorMessage'
67           description: Unauthorized
68         "403":
69           content:
70             application/json:
71               example:
72                 status: 403
73                 message: Request Forbidden
74                 details: This request is forbidden
75               schema:
76                 $ref: '#/components/schemas/ErrorMessage'
77           description: Forbidden
78         "409":
79           content:
80             application/json:
81               example:
82                 status: 409
83                 message: Conflicting request
84                 details: The request cannot be processed as the resource is in use.
85               schema:
86                 $ref: '#/components/schemas/ErrorMessage'
87           description: Conflict
88         "500":
89           content:
90             application/json:
91               example:
92                 status: 500
93                 message: Internal Server Error
94                 details: Internal Server Error occurred
95               schema:
96                 $ref: '#/components/schemas/ErrorMessage'
97           description: Internal Server Error
98       summary: Create a dataspace
99       tags:
100       - cps-admin
101   /{apiVersion}/dataspaces:
102     delete:
103       description: Delete a dataspace
104       operationId: deleteDataspace
105       parameters:
106       - description: apiVersion
107         in: path
108         name: apiVersion
109         required: true
110         schema:
111           default: v2
112           enum:
113           - v1
114           - v2
115           type: string
116       - description: dataspace-name
117         in: query
118         name: dataspace-name
119         required: true
120         schema:
121           example: my-dataspace
122           type: string
123       responses:
124         "204":
125           content: {}
126           description: No Content
127         "400":
128           content:
129             application/json:
130               example:
131                 status: 400
132                 message: Bad Request
133                 details: The provided request is not valid
134               schema:
135                 $ref: '#/components/schemas/ErrorMessage'
136           description: Bad Request
137         "401":
138           content:
139             application/json:
140               example:
141                 status: 401
142                 message: Unauthorized request
143                 details: This request is unauthorized
144               schema:
145                 $ref: '#/components/schemas/ErrorMessage'
146           description: Unauthorized
147         "403":
148           content:
149             application/json:
150               example:
151                 status: 403
152                 message: Request Forbidden
153                 details: This request is forbidden
154               schema:
155                 $ref: '#/components/schemas/ErrorMessage'
156           description: Forbidden
157         "409":
158           content:
159             application/json:
160               example:
161                 status: 409
162                 message: Conflicting request
163                 details: The request cannot be processed as the resource is in use.
164               schema:
165                 $ref: '#/components/schemas/ErrorMessage'
166           description: Conflict
167         "500":
168           content:
169             application/json:
170               example:
171                 status: 500
172                 message: Internal Server Error
173                 details: Internal Server Error occurred
174               schema:
175                 $ref: '#/components/schemas/ErrorMessage'
176           description: Internal Server Error
177       summary: Delete a dataspace
178       tags:
179       - cps-admin
180   /v2/dataspaces:
181     post:
182       description: Create a new dataspace
183       operationId: createDataspaceV2
184       parameters:
185       - description: dataspace-name
186         in: query
187         name: dataspace-name
188         required: true
189         schema:
190           example: my-dataspace
191           type: string
192       responses:
193         "201":
194           description: Created without response body
195         "400":
196           content:
197             application/json:
198               example:
199                 status: 400
200                 message: Bad Request
201                 details: The provided request is not valid
202               schema:
203                 $ref: '#/components/schemas/ErrorMessage'
204           description: Bad Request
205         "401":
206           content:
207             application/json:
208               example:
209                 status: 401
210                 message: Unauthorized request
211                 details: This request is unauthorized
212               schema:
213                 $ref: '#/components/schemas/ErrorMessage'
214           description: Unauthorized
215         "403":
216           content:
217             application/json:
218               example:
219                 status: 403
220                 message: Request Forbidden
221                 details: This request is forbidden
222               schema:
223                 $ref: '#/components/schemas/ErrorMessage'
224           description: Forbidden
225         "409":
226           content:
227             application/json:
228               example:
229                 status: 409
230                 message: Conflicting request
231                 details: The request cannot be processed as the resource is in use.
232               schema:
233                 $ref: '#/components/schemas/ErrorMessage'
234           description: Conflict
235         "500":
236           content:
237             application/json:
238               example:
239                 status: 500
240                 message: Internal Server Error
241                 details: Internal Server Error occurred
242               schema:
243                 $ref: '#/components/schemas/ErrorMessage'
244           description: Internal Server Error
245       summary: Create a dataspace
246       tags:
247       - cps-admin
248   /{apiVersion}/admin/dataspaces:
249     get:
250       description: Read all dataspaces
251       operationId: getAllDataspaces
252       parameters:
253       - description: apiVersion
254         in: path
255         name: apiVersion
256         required: true
257         schema:
258           default: v2
259           enum:
260           - v1
261           - v2
262           type: string
263       responses:
264         "200":
265           content:
266             application/json:
267               schema:
268                 items:
269                   $ref: '#/components/schemas/DataspaceDetails'
270                 type: array
271           description: OK
272         "400":
273           content:
274             application/json:
275               example:
276                 status: 400
277                 message: Bad Request
278                 details: The provided request is not valid
279               schema:
280                 $ref: '#/components/schemas/ErrorMessage'
281           description: Bad Request
282         "401":
283           content:
284             application/json:
285               example:
286                 status: 401
287                 message: Unauthorized request
288                 details: This request is unauthorized
289               schema:
290                 $ref: '#/components/schemas/ErrorMessage'
291           description: Unauthorized
292         "403":
293           content:
294             application/json:
295               example:
296                 status: 403
297                 message: Request Forbidden
298                 details: This request is forbidden
299               schema:
300                 $ref: '#/components/schemas/ErrorMessage'
301           description: Forbidden
302         "500":
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       summary: Get all dataspaces
313       tags:
314       - cps-admin
315   /{apiVersion}/admin/dataspaces/{dataspace-name}:
316     get:
317       description: Read a dataspace given a dataspace name
318       operationId: getDataspace
319       parameters:
320       - description: apiVersion
321         in: path
322         name: apiVersion
323         required: true
324         schema:
325           default: v2
326           enum:
327           - v1
328           - v2
329           type: string
330       - description: dataspace-name
331         in: path
332         name: dataspace-name
333         required: true
334         schema:
335           example: my-dataspace
336           type: string
337       responses:
338         "200":
339           content:
340             application/json:
341               schema:
342                 $ref: '#/components/schemas/DataspaceDetails'
343           description: OK
344         "400":
345           content:
346             application/json:
347               example:
348                 status: 400
349                 message: Bad Request
350                 details: The provided request is not valid
351               schema:
352                 $ref: '#/components/schemas/ErrorMessage'
353           description: Bad Request
354         "401":
355           content:
356             application/json:
357               example:
358                 status: 401
359                 message: Unauthorized request
360                 details: This request is unauthorized
361               schema:
362                 $ref: '#/components/schemas/ErrorMessage'
363           description: Unauthorized
364         "403":
365           content:
366             application/json:
367               example:
368                 status: 403
369                 message: Request Forbidden
370                 details: This request is forbidden
371               schema:
372                 $ref: '#/components/schemas/ErrorMessage'
373           description: Forbidden
374         "500":
375           content:
376             application/json:
377               example:
378                 status: 500
379                 message: Internal Server Error
380                 details: Internal Server Error occurred
381               schema:
382                 $ref: '#/components/schemas/ErrorMessage'
383           description: Internal Server Error
384       summary: Get a dataspace
385       tags:
386       - cps-admin
387   /v1/dataspaces/{dataspace-name}/anchors:
388     post:
389       deprecated: true
390       description: Create a new anchor in the given dataspace
391       operationId: createAnchor
392       parameters:
393       - description: dataspace-name
394         in: path
395         name: dataspace-name
396         required: true
397         schema:
398           example: my-dataspace
399           type: string
400       - description: schema-set-name
401         in: query
402         name: schema-set-name
403         required: true
404         schema:
405           example: my-schema-set
406           type: string
407       - description: anchor-name
408         in: query
409         name: anchor-name
410         required: true
411         schema:
412           example: my-anchor
413           type: string
414       responses:
415         "201":
416           content:
417             text/plain:
418               schema:
419                 example: my-resource
420                 type: string
421           description: Created
422         "400":
423           content:
424             application/json:
425               example:
426                 status: 400
427                 message: Bad Request
428                 details: The provided request is not valid
429               schema:
430                 $ref: '#/components/schemas/ErrorMessage'
431           description: Bad Request
432         "401":
433           content:
434             application/json:
435               example:
436                 status: 401
437                 message: Unauthorized request
438                 details: This request is unauthorized
439               schema:
440                 $ref: '#/components/schemas/ErrorMessage'
441           description: Unauthorized
442         "403":
443           content:
444             application/json:
445               example:
446                 status: 403
447                 message: Request Forbidden
448                 details: This request is forbidden
449               schema:
450                 $ref: '#/components/schemas/ErrorMessage'
451           description: Forbidden
452         "409":
453           content:
454             application/json:
455               example:
456                 status: 409
457                 message: Conflicting request
458                 details: The request cannot be processed as the resource is in use.
459               schema:
460                 $ref: '#/components/schemas/ErrorMessage'
461           description: Conflict
462         "500":
463           content:
464             application/json:
465               example:
466                 status: 500
467                 message: Internal Server Error
468                 details: Internal Server Error occurred
469               schema:
470                 $ref: '#/components/schemas/ErrorMessage'
471           description: Internal Server Error
472       summary: Create an anchor
473       tags:
474       - cps-admin
475   /v2/dataspaces/{dataspace-name}/anchors:
476     post:
477       description: Create a new anchor in the given dataspace
478       operationId: createAnchorV2
479       parameters:
480       - description: dataspace-name
481         in: path
482         name: dataspace-name
483         required: true
484         schema:
485           example: my-dataspace
486           type: string
487       - description: schema-set-name
488         in: query
489         name: schema-set-name
490         required: true
491         schema:
492           example: my-schema-set
493           type: string
494       - description: anchor-name
495         in: query
496         name: anchor-name
497         required: true
498         schema:
499           example: my-anchor
500           type: string
501       responses:
502         "201":
503           description: Created without response body
504         "400":
505           content:
506             application/json:
507               example:
508                 status: 400
509                 message: Bad Request
510                 details: The provided request is not valid
511               schema:
512                 $ref: '#/components/schemas/ErrorMessage'
513           description: Bad Request
514         "401":
515           content:
516             application/json:
517               example:
518                 status: 401
519                 message: Unauthorized request
520                 details: This request is unauthorized
521               schema:
522                 $ref: '#/components/schemas/ErrorMessage'
523           description: Unauthorized
524         "403":
525           content:
526             application/json:
527               example:
528                 status: 403
529                 message: Request Forbidden
530                 details: This request is forbidden
531               schema:
532                 $ref: '#/components/schemas/ErrorMessage'
533           description: Forbidden
534         "409":
535           content:
536             application/json:
537               example:
538                 status: 409
539                 message: Conflicting request
540                 details: The request cannot be processed as the resource is in use.
541               schema:
542                 $ref: '#/components/schemas/ErrorMessage'
543           description: Conflict
544         "500":
545           content:
546             application/json:
547               example:
548                 status: 500
549                 message: Internal Server Error
550                 details: Internal Server Error occurred
551               schema:
552                 $ref: '#/components/schemas/ErrorMessage'
553           description: Internal Server Error
554       summary: Create an anchor
555       tags:
556       - cps-admin
557   /{apiVersion}/dataspaces/{dataspace-name}/anchors:
558     get:
559       description: "Read all anchors, given a dataspace"
560       operationId: getAnchors
561       parameters:
562       - description: apiVersion
563         in: path
564         name: apiVersion
565         required: true
566         schema:
567           default: v2
568           enum:
569           - v1
570           - v2
571           type: string
572       - description: dataspace-name
573         in: path
574         name: dataspace-name
575         required: true
576         schema:
577           example: my-dataspace
578           type: string
579       responses:
580         "200":
581           content:
582             application/json:
583               schema:
584                 items:
585                   $ref: '#/components/schemas/AnchorDetails'
586                 type: array
587           description: OK
588         "400":
589           content:
590             application/json:
591               example:
592                 status: 400
593                 message: Bad Request
594                 details: The provided request is not valid
595               schema:
596                 $ref: '#/components/schemas/ErrorMessage'
597           description: Bad Request
598         "401":
599           content:
600             application/json:
601               example:
602                 status: 401
603                 message: Unauthorized request
604                 details: This request is unauthorized
605               schema:
606                 $ref: '#/components/schemas/ErrorMessage'
607           description: Unauthorized
608         "403":
609           content:
610             application/json:
611               example:
612                 status: 403
613                 message: Request Forbidden
614                 details: This request is forbidden
615               schema:
616                 $ref: '#/components/schemas/ErrorMessage'
617           description: Forbidden
618         "500":
619           content:
620             application/json:
621               example:
622                 status: 500
623                 message: Internal Server Error
624                 details: Internal Server Error occurred
625               schema:
626                 $ref: '#/components/schemas/ErrorMessage'
627           description: Internal Server Error
628       summary: Get anchors
629       tags:
630       - cps-admin
631   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}:
632     delete:
633       description: Delete an anchor given an anchor name and a dataspace
634       operationId: deleteAnchor
635       parameters:
636       - description: apiVersion
637         in: path
638         name: apiVersion
639         required: true
640         schema:
641           default: v2
642           enum:
643           - v1
644           - v2
645           type: string
646       - description: dataspace-name
647         in: path
648         name: dataspace-name
649         required: true
650         schema:
651           example: my-dataspace
652           type: string
653       - description: anchor-name
654         in: path
655         name: anchor-name
656         required: true
657         schema:
658           example: my-anchor
659           type: string
660       responses:
661         "204":
662           content: {}
663           description: No Content
664         "400":
665           content:
666             application/json:
667               example:
668                 status: 400
669                 message: Bad Request
670                 details: The provided request is not valid
671               schema:
672                 $ref: '#/components/schemas/ErrorMessage'
673           description: Bad Request
674         "401":
675           content:
676             application/json:
677               example:
678                 status: 401
679                 message: Unauthorized request
680                 details: This request is unauthorized
681               schema:
682                 $ref: '#/components/schemas/ErrorMessage'
683           description: Unauthorized
684         "403":
685           content:
686             application/json:
687               example:
688                 status: 403
689                 message: Request Forbidden
690                 details: This request is forbidden
691               schema:
692                 $ref: '#/components/schemas/ErrorMessage'
693           description: Forbidden
694         "500":
695           content:
696             application/json:
697               example:
698                 status: 500
699                 message: Internal Server Error
700                 details: Internal Server Error occurred
701               schema:
702                 $ref: '#/components/schemas/ErrorMessage'
703           description: Internal Server Error
704       summary: Delete an anchor
705       tags:
706       - cps-admin
707     get:
708       description: Read an anchor given an anchor name and a dataspace
709       operationId: getAnchor
710       parameters:
711       - description: apiVersion
712         in: path
713         name: apiVersion
714         required: true
715         schema:
716           default: v2
717           enum:
718           - v1
719           - v2
720           type: string
721       - description: dataspace-name
722         in: path
723         name: dataspace-name
724         required: true
725         schema:
726           example: my-dataspace
727           type: string
728       - description: anchor-name
729         in: path
730         name: anchor-name
731         required: true
732         schema:
733           example: my-anchor
734           type: string
735       responses:
736         "200":
737           content:
738             application/json:
739               schema:
740                 $ref: '#/components/schemas/AnchorDetails'
741           description: OK
742         "400":
743           content:
744             application/json:
745               example:
746                 status: 400
747                 message: Bad Request
748                 details: The provided request is not valid
749               schema:
750                 $ref: '#/components/schemas/ErrorMessage'
751           description: Bad Request
752         "401":
753           content:
754             application/json:
755               example:
756                 status: 401
757                 message: Unauthorized request
758                 details: This request is unauthorized
759               schema:
760                 $ref: '#/components/schemas/ErrorMessage'
761           description: Unauthorized
762         "403":
763           content:
764             application/json:
765               example:
766                 status: 403
767                 message: Request Forbidden
768                 details: This request is forbidden
769               schema:
770                 $ref: '#/components/schemas/ErrorMessage'
771           description: Forbidden
772         "500":
773           content:
774             application/json:
775               example:
776                 status: 500
777                 message: Internal Server Error
778                 details: Internal Server Error occurred
779               schema:
780                 $ref: '#/components/schemas/ErrorMessage'
781           description: Internal Server Error
782       summary: Get an anchor
783       tags:
784       - cps-admin
785   /v1/dataspaces/{dataspace-name}/schema-sets:
786     post:
787       deprecated: true
788       description: Create a new schema set in the given dataspace
789       operationId: createSchemaSet
790       parameters:
791       - description: dataspace-name
792         in: path
793         name: dataspace-name
794         required: true
795         schema:
796           example: my-dataspace
797           type: string
798       - description: schema-set-name
799         in: query
800         name: schema-set-name
801         required: true
802         schema:
803           example: my-schema-set
804           type: string
805       requestBody:
806         content:
807           multipart/form-data:
808             schema:
809               $ref: '#/components/schemas/MultipartFile'
810         required: true
811       responses:
812         "201":
813           content:
814             text/plain:
815               schema:
816                 example: my-resource
817                 type: string
818           description: Created
819         "400":
820           content:
821             application/json:
822               example:
823                 status: 400
824                 message: Bad Request
825                 details: The provided request is not valid
826               schema:
827                 $ref: '#/components/schemas/ErrorMessage'
828           description: Bad Request
829         "401":
830           content:
831             application/json:
832               example:
833                 status: 401
834                 message: Unauthorized request
835                 details: This request is unauthorized
836               schema:
837                 $ref: '#/components/schemas/ErrorMessage'
838           description: Unauthorized
839         "403":
840           content:
841             application/json:
842               example:
843                 status: 403
844                 message: Request Forbidden
845                 details: This request is forbidden
846               schema:
847                 $ref: '#/components/schemas/ErrorMessage'
848           description: Forbidden
849         "409":
850           content:
851             application/json:
852               example:
853                 status: 409
854                 message: Conflicting request
855                 details: The request cannot be processed as the resource is in use.
856               schema:
857                 $ref: '#/components/schemas/ErrorMessage'
858           description: Conflict
859         "500":
860           content:
861             application/json:
862               example:
863                 status: 500
864                 message: Internal Server Error
865                 details: Internal Server Error occurred
866               schema:
867                 $ref: '#/components/schemas/ErrorMessage'
868           description: Internal Server Error
869       summary: Create a schema set
870       tags:
871       - cps-admin
872   /v2/dataspaces/{dataspace-name}/schema-sets:
873     post:
874       description: Create a new schema set in the given dataspace
875       operationId: createSchemaSetV2
876       parameters:
877       - description: dataspace-name
878         in: path
879         name: dataspace-name
880         required: true
881         schema:
882           example: my-dataspace
883           type: string
884       - description: schema-set-name
885         in: query
886         name: schema-set-name
887         required: true
888         schema:
889           example: my-schema-set
890           type: string
891       requestBody:
892         content:
893           multipart/form-data:
894             schema:
895               $ref: '#/components/schemas/MultipartFile'
896         required: true
897       responses:
898         "201":
899           description: Created without response body
900         "400":
901           content:
902             application/json:
903               example:
904                 status: 400
905                 message: Bad Request
906                 details: The provided request is not valid
907               schema:
908                 $ref: '#/components/schemas/ErrorMessage'
909           description: Bad Request
910         "401":
911           content:
912             application/json:
913               example:
914                 status: 401
915                 message: Unauthorized request
916                 details: This request is unauthorized
917               schema:
918                 $ref: '#/components/schemas/ErrorMessage'
919           description: Unauthorized
920         "403":
921           content:
922             application/json:
923               example:
924                 status: 403
925                 message: Request Forbidden
926                 details: This request is forbidden
927               schema:
928                 $ref: '#/components/schemas/ErrorMessage'
929           description: Forbidden
930         "409":
931           content:
932             application/json:
933               example:
934                 status: 409
935                 message: Conflicting request
936                 details: The request cannot be processed as the resource is in use.
937               schema:
938                 $ref: '#/components/schemas/ErrorMessage'
939           description: Conflict
940         "500":
941           content:
942             application/json:
943               example:
944                 status: 500
945                 message: Internal Server Error
946                 details: Internal Server Error occurred
947               schema:
948                 $ref: '#/components/schemas/ErrorMessage'
949           description: Internal Server Error
950       summary: Create a schema set
951       tags:
952       - cps-admin
953   /{apiVersion}/dataspaces/{dataspace-name}/schema-sets:
954     get:
955       description: "Read all schema sets, given a dataspace"
956       operationId: getSchemaSets
957       parameters:
958       - description: apiVersion
959         in: path
960         name: apiVersion
961         required: true
962         schema:
963           default: v2
964           enum:
965           - v1
966           - v2
967           type: string
968       - description: dataspace-name
969         in: path
970         name: dataspace-name
971         required: true
972         schema:
973           example: my-dataspace
974           type: string
975       responses:
976         "200":
977           content:
978             application/json:
979               schema:
980                 items:
981                   $ref: '#/components/schemas/SchemaSetDetails'
982                 type: array
983           description: OK
984         "400":
985           content:
986             application/json:
987               example:
988                 status: 400
989                 message: Bad Request
990                 details: The provided request is not valid
991               schema:
992                 $ref: '#/components/schemas/ErrorMessage'
993           description: Bad Request
994         "401":
995           content:
996             application/json:
997               example:
998                 status: 401
999                 message: Unauthorized request
1000                 details: This request is unauthorized
1001               schema:
1002                 $ref: '#/components/schemas/ErrorMessage'
1003           description: Unauthorized
1004         "403":
1005           content:
1006             application/json:
1007               example:
1008                 status: 403
1009                 message: Request Forbidden
1010                 details: This request is forbidden
1011               schema:
1012                 $ref: '#/components/schemas/ErrorMessage'
1013           description: Forbidden
1014         "500":
1015           content:
1016             application/json:
1017               example:
1018                 status: 500
1019                 message: Internal Server Error
1020                 details: Internal Server Error occurred
1021               schema:
1022                 $ref: '#/components/schemas/ErrorMessage'
1023           description: Internal Server Error
1024       summary: Get schema sets
1025       tags:
1026       - cps-admin
1027   /{apiVersion}/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}:
1028     delete:
1029       description: Delete a schema set given a schema set name and a dataspace
1030       operationId: deleteSchemaSet
1031       parameters:
1032       - description: apiVersion
1033         in: path
1034         name: apiVersion
1035         required: true
1036         schema:
1037           default: v2
1038           enum:
1039           - v1
1040           - v2
1041           type: string
1042       - description: dataspace-name
1043         in: path
1044         name: dataspace-name
1045         required: true
1046         schema:
1047           example: my-dataspace
1048           type: string
1049       - description: schema-set-name
1050         in: path
1051         name: schema-set-name
1052         required: true
1053         schema:
1054           example: my-schema-set
1055           type: string
1056       responses:
1057         "204":
1058           content: {}
1059           description: No Content
1060         "400":
1061           content:
1062             application/json:
1063               example:
1064                 status: 400
1065                 message: Bad Request
1066                 details: The provided request is not valid
1067               schema:
1068                 $ref: '#/components/schemas/ErrorMessage'
1069           description: Bad Request
1070         "401":
1071           content:
1072             application/json:
1073               example:
1074                 status: 401
1075                 message: Unauthorized request
1076                 details: This request is unauthorized
1077               schema:
1078                 $ref: '#/components/schemas/ErrorMessage'
1079           description: Unauthorized
1080         "403":
1081           content:
1082             application/json:
1083               example:
1084                 status: 403
1085                 message: Request Forbidden
1086                 details: This request is forbidden
1087               schema:
1088                 $ref: '#/components/schemas/ErrorMessage'
1089           description: Forbidden
1090         "409":
1091           content:
1092             application/json:
1093               example:
1094                 status: 409
1095                 message: Conflicting request
1096                 details: The request cannot be processed as the resource is in use.
1097               schema:
1098                 $ref: '#/components/schemas/ErrorMessage'
1099           description: Conflict
1100         "500":
1101           content:
1102             application/json:
1103               example:
1104                 status: 500
1105                 message: Internal Server Error
1106                 details: Internal Server Error occurred
1107               schema:
1108                 $ref: '#/components/schemas/ErrorMessage'
1109           description: Internal Server Error
1110       summary: Delete a schema set
1111       tags:
1112       - cps-admin
1113     get:
1114       description: Read a schema set given a schema set name and a dataspace
1115       operationId: getSchemaSet
1116       parameters:
1117       - description: apiVersion
1118         in: path
1119         name: apiVersion
1120         required: true
1121         schema:
1122           default: v2
1123           enum:
1124           - v1
1125           - v2
1126           type: string
1127       - description: dataspace-name
1128         in: path
1129         name: dataspace-name
1130         required: true
1131         schema:
1132           example: my-dataspace
1133           type: string
1134       - description: schema-set-name
1135         in: path
1136         name: schema-set-name
1137         required: true
1138         schema:
1139           example: my-schema-set
1140           type: string
1141       responses:
1142         "200":
1143           content:
1144             application/json:
1145               schema:
1146                 $ref: '#/components/schemas/SchemaSetDetails'
1147           description: OK
1148         "400":
1149           content:
1150             application/json:
1151               example:
1152                 status: 400
1153                 message: Bad Request
1154                 details: The provided request is not valid
1155               schema:
1156                 $ref: '#/components/schemas/ErrorMessage'
1157           description: Bad Request
1158         "401":
1159           content:
1160             application/json:
1161               example:
1162                 status: 401
1163                 message: Unauthorized request
1164                 details: This request is unauthorized
1165               schema:
1166                 $ref: '#/components/schemas/ErrorMessage'
1167           description: Unauthorized
1168         "403":
1169           content:
1170             application/json:
1171               example:
1172                 status: 403
1173                 message: Request Forbidden
1174                 details: This request is forbidden
1175               schema:
1176                 $ref: '#/components/schemas/ErrorMessage'
1177           description: Forbidden
1178         "500":
1179           content:
1180             application/json:
1181               example:
1182                 status: 500
1183                 message: Internal Server Error
1184                 details: Internal Server Error occurred
1185               schema:
1186                 $ref: '#/components/schemas/ErrorMessage'
1187           description: Internal Server Error
1188       summary: Get a schema set
1189       tags:
1190       - cps-admin
1191   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
1192     get:
1193       deprecated: true
1194       description: Get a node with an option to retrieve all the children for a given
1195         anchor and dataspace
1196       operationId: getNodeByDataspaceAndAnchor
1197       parameters:
1198       - description: dataspace-name
1199         in: path
1200         name: dataspace-name
1201         required: true
1202         schema:
1203           example: my-dataspace
1204           type: string
1205       - description: anchor-name
1206         in: path
1207         name: anchor-name
1208         required: true
1209         schema:
1210           example: my-anchor
1211           type: string
1212       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1213         examples:
1214           container xpath:
1215             value: /shops/bookstore
1216           list attributes xpath:
1217             value: "/shops/bookstore/categories[@code=1]"
1218         in: query
1219         name: xpath
1220         required: false
1221         schema:
1222           default: /
1223           type: string
1224       - description: include-descendants
1225         in: query
1226         name: include-descendants
1227         required: false
1228         schema:
1229           default: false
1230           example: false
1231           type: boolean
1232       responses:
1233         "200":
1234           content:
1235             application/json:
1236               examples:
1237                 dataSample:
1238                   $ref: '#/components/examples/dataSample'
1239                   value: null
1240               schema:
1241                 type: object
1242           description: OK
1243         "400":
1244           content:
1245             application/json:
1246               example:
1247                 status: 400
1248                 message: Bad Request
1249                 details: The provided request is not valid
1250               schema:
1251                 $ref: '#/components/schemas/ErrorMessage'
1252           description: Bad Request
1253         "401":
1254           content:
1255             application/json:
1256               example:
1257                 status: 401
1258                 message: Unauthorized request
1259                 details: This request is unauthorized
1260               schema:
1261                 $ref: '#/components/schemas/ErrorMessage'
1262           description: Unauthorized
1263         "403":
1264           content:
1265             application/json:
1266               example:
1267                 status: 403
1268                 message: Request Forbidden
1269                 details: This request is forbidden
1270               schema:
1271                 $ref: '#/components/schemas/ErrorMessage'
1272           description: Forbidden
1273         "500":
1274           content:
1275             application/json:
1276               example:
1277                 status: 500
1278                 message: Internal Server Error
1279                 details: Internal Server Error occurred
1280               schema:
1281                 $ref: '#/components/schemas/ErrorMessage'
1282           description: Internal Server Error
1283       summary: Get a node
1284       tags:
1285       - cps-data
1286       x-codegen-request-body-name: xpath
1287   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
1288     get:
1289       description: Get a node with an option to retrieve all the children for a given
1290         anchor and dataspace
1291       operationId: getNodeByDataspaceAndAnchorV2
1292       parameters:
1293       - description: dataspace-name
1294         in: path
1295         name: dataspace-name
1296         required: true
1297         schema:
1298           example: my-dataspace
1299           type: string
1300       - description: anchor-name
1301         in: path
1302         name: anchor-name
1303         required: true
1304         schema:
1305           example: my-anchor
1306           type: string
1307       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1308         examples:
1309           container xpath:
1310             value: /shops/bookstore
1311           list attributes xpath:
1312             value: "/shops/bookstore/categories[@code=1]"
1313         in: query
1314         name: xpath
1315         required: false
1316         schema:
1317           default: /
1318           type: string
1319       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
1320           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
1321           \ number."
1322         in: query
1323         name: descendants
1324         required: false
1325         schema:
1326           default: none
1327           example: "3"
1328           type: string
1329       responses:
1330         "200":
1331           content:
1332             application/json:
1333               examples:
1334                 dataSample:
1335                   $ref: '#/components/examples/dataSample'
1336                   value: null
1337               schema:
1338                 type: object
1339           description: OK
1340         "400":
1341           content:
1342             application/json:
1343               example:
1344                 status: 400
1345                 message: Bad Request
1346                 details: The provided request is not valid
1347               schema:
1348                 $ref: '#/components/schemas/ErrorMessage'
1349           description: Bad Request
1350         "401":
1351           content:
1352             application/json:
1353               example:
1354                 status: 401
1355                 message: Unauthorized request
1356                 details: This request is unauthorized
1357               schema:
1358                 $ref: '#/components/schemas/ErrorMessage'
1359           description: Unauthorized
1360         "403":
1361           content:
1362             application/json:
1363               example:
1364                 status: 403
1365                 message: Request Forbidden
1366                 details: This request is forbidden
1367               schema:
1368                 $ref: '#/components/schemas/ErrorMessage'
1369           description: Forbidden
1370         "500":
1371           content:
1372             application/json:
1373               example:
1374                 status: 500
1375                 message: Internal Server Error
1376                 details: Internal Server Error occurred
1377               schema:
1378                 $ref: '#/components/schemas/ErrorMessage'
1379           description: Internal Server Error
1380       summary: Get a node
1381       tags:
1382       - cps-data
1383       x-codegen-request-body-name: xpath
1384   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
1385     delete:
1386       description: Delete a datanode for a given dataspace and anchor given a node
1387         xpath.
1388       operationId: deleteDataNode
1389       parameters:
1390       - description: apiVersion
1391         in: path
1392         name: apiVersion
1393         required: true
1394         schema:
1395           default: v2
1396           enum:
1397           - v1
1398           - v2
1399           type: string
1400       - description: dataspace-name
1401         in: path
1402         name: dataspace-name
1403         required: true
1404         schema:
1405           example: my-dataspace
1406           type: string
1407       - description: anchor-name
1408         in: path
1409         name: anchor-name
1410         required: true
1411         schema:
1412           example: my-anchor
1413           type: string
1414       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1415         examples:
1416           container xpath:
1417             value: /shops/bookstore
1418           list attributes xpath:
1419             value: "/shops/bookstore/categories[@code=1]"
1420         in: query
1421         name: xpath
1422         required: false
1423         schema:
1424           default: /
1425           type: string
1426       - description: observed-timestamp
1427         in: query
1428         name: observed-timestamp
1429         required: false
1430         schema:
1431           example: 2021-03-21T00:10:34.030-0100
1432           type: string
1433       responses:
1434         "204":
1435           content: {}
1436           description: No Content
1437         "400":
1438           content:
1439             application/json:
1440               example:
1441                 status: 400
1442                 message: Bad Request
1443                 details: The provided request is not valid
1444               schema:
1445                 $ref: '#/components/schemas/ErrorMessage'
1446           description: Bad Request
1447         "401":
1448           content:
1449             application/json:
1450               example:
1451                 status: 401
1452                 message: Unauthorized request
1453                 details: This request is unauthorized
1454               schema:
1455                 $ref: '#/components/schemas/ErrorMessage'
1456           description: Unauthorized
1457         "403":
1458           content:
1459             application/json:
1460               example:
1461                 status: 403
1462                 message: Request Forbidden
1463                 details: This request is forbidden
1464               schema:
1465                 $ref: '#/components/schemas/ErrorMessage'
1466           description: Forbidden
1467         "500":
1468           content:
1469             application/json:
1470               example:
1471                 status: 500
1472                 message: Internal Server Error
1473                 details: Internal Server Error occurred
1474               schema:
1475                 $ref: '#/components/schemas/ErrorMessage'
1476           description: Internal Server Error
1477       summary: Delete a data node
1478       tags:
1479       - cps-data
1480     patch:
1481       description: Update a data node leaves for a given dataspace and anchor and
1482         a parent node xpath. This operation is currently supported for one top level
1483         data node only.
1484       operationId: updateNodeLeaves
1485       parameters:
1486       - description: apiVersion
1487         in: path
1488         name: apiVersion
1489         required: true
1490         schema:
1491           default: v2
1492           enum:
1493           - v1
1494           - v2
1495           type: string
1496       - description: dataspace-name
1497         in: path
1498         name: dataspace-name
1499         required: true
1500         schema:
1501           example: my-dataspace
1502           type: string
1503       - description: anchor-name
1504         in: path
1505         name: anchor-name
1506         required: true
1507         schema:
1508           example: my-anchor
1509           type: string
1510       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1511         examples:
1512           container xpath:
1513             value: /shops/bookstore
1514           list attributes xpath:
1515             value: "/shops/bookstore/categories[@code=1]"
1516         in: query
1517         name: xpath
1518         required: false
1519         schema:
1520           default: /
1521           type: string
1522       - description: observed-timestamp
1523         in: query
1524         name: observed-timestamp
1525         required: false
1526         schema:
1527           example: 2021-03-21T00:10:34.030-0100
1528           type: string
1529       requestBody:
1530         content:
1531           application/json:
1532             examples:
1533               dataSample:
1534                 $ref: '#/components/examples/dataSample'
1535                 value: null
1536             schema:
1537               type: object
1538         required: true
1539       responses:
1540         "200":
1541           content:
1542             application/json:
1543               examples:
1544                 dataSample:
1545                   value: ""
1546               schema:
1547                 type: object
1548           description: OK
1549         "400":
1550           content:
1551             application/json:
1552               example:
1553                 status: 400
1554                 message: Bad Request
1555                 details: The provided request is not valid
1556               schema:
1557                 $ref: '#/components/schemas/ErrorMessage'
1558           description: Bad Request
1559         "401":
1560           content:
1561             application/json:
1562               example:
1563                 status: 401
1564                 message: Unauthorized request
1565                 details: This request is unauthorized
1566               schema:
1567                 $ref: '#/components/schemas/ErrorMessage'
1568           description: Unauthorized
1569         "403":
1570           content:
1571             application/json:
1572               example:
1573                 status: 403
1574                 message: Request Forbidden
1575                 details: This request is forbidden
1576               schema:
1577                 $ref: '#/components/schemas/ErrorMessage'
1578           description: Forbidden
1579         "500":
1580           content:
1581             application/json:
1582               example:
1583                 status: 500
1584                 message: Internal Server Error
1585                 details: Internal Server Error occurred
1586               schema:
1587                 $ref: '#/components/schemas/ErrorMessage'
1588           description: Internal Server Error
1589       summary: Update node leaves
1590       tags:
1591       - cps-data
1592     post:
1593       description: Create a node for a given anchor and dataspace
1594       operationId: createNode
1595       parameters:
1596       - description: apiVersion
1597         in: path
1598         name: apiVersion
1599         required: true
1600         schema:
1601           default: v2
1602           enum:
1603           - v1
1604           - v2
1605           type: string
1606       - description: dataspace-name
1607         in: path
1608         name: dataspace-name
1609         required: true
1610         schema:
1611           example: my-dataspace
1612           type: string
1613       - description: anchor-name
1614         in: path
1615         name: anchor-name
1616         required: true
1617         schema:
1618           example: my-anchor
1619           type: string
1620       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1621         examples:
1622           container xpath:
1623             value: /shops/bookstore
1624           list attributes xpath:
1625             value: "/shops/bookstore/categories[@code=1]"
1626         in: query
1627         name: xpath
1628         required: false
1629         schema:
1630           default: /
1631           type: string
1632       - description: observed-timestamp
1633         in: query
1634         name: observed-timestamp
1635         required: false
1636         schema:
1637           example: 2021-03-21T00:10:34.030-0100
1638           type: string
1639       - description: Content type header
1640         in: header
1641         name: Content-Type
1642         required: true
1643         schema:
1644           example: application/json
1645           type: string
1646       requestBody:
1647         content:
1648           application/json:
1649             examples:
1650               dataSample:
1651                 $ref: '#/components/examples/dataSample'
1652                 value: null
1653             schema:
1654               type: string
1655           application/xml:
1656             examples:
1657               dataSample:
1658                 $ref: '#/components/examples/dataSampleXml'
1659                 value: null
1660             schema:
1661               type: object
1662               xml:
1663                 name: stores
1664         required: true
1665       responses:
1666         "201":
1667           content:
1668             text/plain:
1669               schema:
1670                 example: my-resource
1671                 type: string
1672           description: Created
1673         "400":
1674           content:
1675             application/json:
1676               example:
1677                 status: 400
1678                 message: Bad Request
1679                 details: The provided request is not valid
1680               schema:
1681                 $ref: '#/components/schemas/ErrorMessage'
1682           description: Bad Request
1683         "401":
1684           content:
1685             application/json:
1686               example:
1687                 status: 401
1688                 message: Unauthorized request
1689                 details: This request is unauthorized
1690               schema:
1691                 $ref: '#/components/schemas/ErrorMessage'
1692           description: Unauthorized
1693         "403":
1694           content:
1695             application/json:
1696               example:
1697                 status: 403
1698                 message: Request Forbidden
1699                 details: This request is forbidden
1700               schema:
1701                 $ref: '#/components/schemas/ErrorMessage'
1702           description: Forbidden
1703         "409":
1704           content:
1705             application/json:
1706               example:
1707                 status: 409
1708                 message: Conflicting request
1709                 details: The request cannot be processed as the resource is in use.
1710               schema:
1711                 $ref: '#/components/schemas/ErrorMessage'
1712           description: Conflict
1713         "500":
1714           content:
1715             application/json:
1716               example:
1717                 status: 500
1718                 message: Internal Server Error
1719                 details: Internal Server Error occurred
1720               schema:
1721                 $ref: '#/components/schemas/ErrorMessage'
1722           description: Internal Server Error
1723       summary: Create a node
1724       tags:
1725       - cps-data
1726     put:
1727       description: "Replace a node with descendants for a given dataspace, anchor\
1728         \ and a parent node xpath"
1729       operationId: replaceNode
1730       parameters:
1731       - description: apiVersion
1732         in: path
1733         name: apiVersion
1734         required: true
1735         schema:
1736           default: v2
1737           enum:
1738           - v1
1739           - v2
1740           type: string
1741       - description: dataspace-name
1742         in: path
1743         name: dataspace-name
1744         required: true
1745         schema:
1746           example: my-dataspace
1747           type: string
1748       - description: anchor-name
1749         in: path
1750         name: anchor-name
1751         required: true
1752         schema:
1753           example: my-anchor
1754           type: string
1755       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1756         examples:
1757           container xpath:
1758             value: /shops/bookstore
1759           list attributes xpath:
1760             value: "/shops/bookstore/categories[@code=1]"
1761         in: query
1762         name: xpath
1763         required: false
1764         schema:
1765           default: /
1766           type: string
1767       - description: observed-timestamp
1768         in: query
1769         name: observed-timestamp
1770         required: false
1771         schema:
1772           example: 2021-03-21T00:10:34.030-0100
1773           type: string
1774       requestBody:
1775         content:
1776           application/json:
1777             examples:
1778               dataSample:
1779                 $ref: '#/components/examples/dataSample'
1780                 value: null
1781             schema:
1782               type: object
1783         required: true
1784       responses:
1785         "200":
1786           content:
1787             application/json:
1788               examples:
1789                 dataSample:
1790                   value: ""
1791               schema:
1792                 type: object
1793           description: OK
1794         "400":
1795           content:
1796             application/json:
1797               example:
1798                 status: 400
1799                 message: Bad Request
1800                 details: The provided request is not valid
1801               schema:
1802                 $ref: '#/components/schemas/ErrorMessage'
1803           description: Bad Request
1804         "401":
1805           content:
1806             application/json:
1807               example:
1808                 status: 401
1809                 message: Unauthorized request
1810                 details: This request is unauthorized
1811               schema:
1812                 $ref: '#/components/schemas/ErrorMessage'
1813           description: Unauthorized
1814         "403":
1815           content:
1816             application/json:
1817               example:
1818                 status: 403
1819                 message: Request Forbidden
1820                 details: This request is forbidden
1821               schema:
1822                 $ref: '#/components/schemas/ErrorMessage'
1823           description: Forbidden
1824         "500":
1825           content:
1826             application/json:
1827               example:
1828                 status: 500
1829                 message: Internal Server Error
1830                 details: Internal Server Error occurred
1831               schema:
1832                 $ref: '#/components/schemas/ErrorMessage'
1833           description: Internal Server Error
1834       summary: Replace a node with descendants
1835       tags:
1836       - cps-data
1837   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1838     delete:
1839       deprecated: true
1840       description: Delete one or all list element(s) for a given anchor and dataspace
1841       operationId: deleteListOrListElement
1842       parameters:
1843       - description: dataspace-name
1844         in: path
1845         name: dataspace-name
1846         required: true
1847         schema:
1848           example: my-dataspace
1849           type: string
1850       - description: anchor-name
1851         in: path
1852         name: anchor-name
1853         required: true
1854         schema:
1855           example: my-anchor
1856           type: string
1857       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1858         examples:
1859           container xpath:
1860             value: /shops/bookstore
1861           list attributes xpath:
1862             value: "/shops/bookstore/categories[@code=1]"
1863         in: query
1864         name: xpath
1865         required: true
1866         schema:
1867           type: string
1868       - description: observed-timestamp
1869         in: query
1870         name: observed-timestamp
1871         required: false
1872         schema:
1873           example: 2021-03-21T00:10:34.030-0100
1874           type: string
1875       responses:
1876         "204":
1877           content: {}
1878           description: No Content
1879         "400":
1880           content:
1881             application/json:
1882               example:
1883                 status: 400
1884                 message: Bad Request
1885                 details: The provided request is not valid
1886               schema:
1887                 $ref: '#/components/schemas/ErrorMessage'
1888           description: Bad Request
1889         "401":
1890           content:
1891             application/json:
1892               example:
1893                 status: 401
1894                 message: Unauthorized request
1895                 details: This request is unauthorized
1896               schema:
1897                 $ref: '#/components/schemas/ErrorMessage'
1898           description: Unauthorized
1899         "403":
1900           content:
1901             application/json:
1902               example:
1903                 status: 403
1904                 message: Request Forbidden
1905                 details: This request is forbidden
1906               schema:
1907                 $ref: '#/components/schemas/ErrorMessage'
1908           description: Forbidden
1909         "500":
1910           content:
1911             application/json:
1912               example:
1913                 status: 500
1914                 message: Internal Server Error
1915                 details: Internal Server Error occurred
1916               schema:
1917                 $ref: '#/components/schemas/ErrorMessage'
1918           description: Internal Server Error
1919       summary: Delete one or all list element(s)
1920       tags:
1921       - cps-data
1922   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1923     post:
1924       description: Add list element(s) to a list for a given anchor and dataspace
1925       operationId: addListElements
1926       parameters:
1927       - description: apiVersion
1928         in: path
1929         name: apiVersion
1930         required: true
1931         schema:
1932           default: v2
1933           enum:
1934           - v1
1935           - v2
1936           type: string
1937       - description: dataspace-name
1938         in: path
1939         name: dataspace-name
1940         required: true
1941         schema:
1942           example: my-dataspace
1943           type: string
1944       - description: anchor-name
1945         in: path
1946         name: anchor-name
1947         required: true
1948         schema:
1949           example: my-anchor
1950           type: string
1951       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1952         examples:
1953           container xpath:
1954             value: /shops/bookstore
1955           list attributes xpath:
1956             value: "/shops/bookstore/categories[@code=1]"
1957         in: query
1958         name: xpath
1959         required: true
1960         schema:
1961           type: string
1962       - description: observed-timestamp
1963         in: query
1964         name: observed-timestamp
1965         required: false
1966         schema:
1967           example: 2021-03-21T00:10:34.030-0100
1968           type: string
1969       requestBody:
1970         content:
1971           application/json:
1972             examples:
1973               dataSample:
1974                 $ref: '#/components/examples/dataSample'
1975                 value: null
1976             schema:
1977               type: object
1978         required: true
1979       responses:
1980         "201":
1981           content:
1982             text/plain:
1983               schema:
1984                 example: my-resource
1985                 type: string
1986           description: Created
1987         "400":
1988           content:
1989             application/json:
1990               example:
1991                 status: 400
1992                 message: Bad Request
1993                 details: The provided request is not valid
1994               schema:
1995                 $ref: '#/components/schemas/ErrorMessage'
1996           description: Bad Request
1997         "401":
1998           content:
1999             application/json:
2000               example:
2001                 status: 401
2002                 message: Unauthorized request
2003                 details: This request is unauthorized
2004               schema:
2005                 $ref: '#/components/schemas/ErrorMessage'
2006           description: Unauthorized
2007         "403":
2008           content:
2009             application/json:
2010               example:
2011                 status: 403
2012                 message: Request Forbidden
2013                 details: This request is forbidden
2014               schema:
2015                 $ref: '#/components/schemas/ErrorMessage'
2016           description: Forbidden
2017         "500":
2018           content:
2019             application/json:
2020               example:
2021                 status: 500
2022                 message: Internal Server Error
2023                 details: Internal Server Error occurred
2024               schema:
2025                 $ref: '#/components/schemas/ErrorMessage'
2026           description: Internal Server Error
2027       summary: Add list element(s)
2028       tags:
2029       - cps-data
2030     put:
2031       description: "Replace list content under a given parent, anchor and dataspace"
2032       operationId: replaceListContent
2033       parameters:
2034       - description: apiVersion
2035         in: path
2036         name: apiVersion
2037         required: true
2038         schema:
2039           default: v2
2040           enum:
2041           - v1
2042           - v2
2043           type: string
2044       - description: dataspace-name
2045         in: path
2046         name: dataspace-name
2047         required: true
2048         schema:
2049           example: my-dataspace
2050           type: string
2051       - description: anchor-name
2052         in: path
2053         name: anchor-name
2054         required: true
2055         schema:
2056           example: my-anchor
2057           type: string
2058       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2059         examples:
2060           container xpath:
2061             value: /shops/bookstore
2062           list attributes xpath:
2063             value: "/shops/bookstore/categories[@code=1]"
2064         in: query
2065         name: xpath
2066         required: true
2067         schema:
2068           type: string
2069       - description: observed-timestamp
2070         in: query
2071         name: observed-timestamp
2072         required: false
2073         schema:
2074           example: 2021-03-21T00:10:34.030-0100
2075           type: string
2076       requestBody:
2077         content:
2078           application/json:
2079             examples:
2080               dataSample:
2081                 $ref: '#/components/examples/dataSample'
2082                 value: null
2083             schema:
2084               type: object
2085         required: true
2086       responses:
2087         "200":
2088           content:
2089             application/json:
2090               examples:
2091                 dataSample:
2092                   value: ""
2093               schema:
2094                 type: object
2095           description: OK
2096         "400":
2097           content:
2098             application/json:
2099               example:
2100                 status: 400
2101                 message: Bad Request
2102                 details: The provided request is not valid
2103               schema:
2104                 $ref: '#/components/schemas/ErrorMessage'
2105           description: Bad Request
2106         "401":
2107           content:
2108             application/json:
2109               example:
2110                 status: 401
2111                 message: Unauthorized request
2112                 details: This request is unauthorized
2113               schema:
2114                 $ref: '#/components/schemas/ErrorMessage'
2115           description: Unauthorized
2116         "403":
2117           content:
2118             application/json:
2119               example:
2120                 status: 403
2121                 message: Request Forbidden
2122                 details: This request is forbidden
2123               schema:
2124                 $ref: '#/components/schemas/ErrorMessage'
2125           description: Forbidden
2126         "500":
2127           content:
2128             application/json:
2129               example:
2130                 status: 500
2131                 message: Internal Server Error
2132                 details: Internal Server Error occurred
2133               schema:
2134                 $ref: '#/components/schemas/ErrorMessage'
2135           description: Internal Server Error
2136       summary: Replace list content
2137       tags:
2138       - cps-data
2139   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/delta:
2140     get:
2141       description: Get delta between two anchors within a given dataspace
2142       operationId: getDeltaByDataspaceAndAnchors
2143       parameters:
2144       - description: dataspace-name
2145         in: path
2146         name: dataspace-name
2147         required: true
2148         schema:
2149           example: my-dataspace
2150           type: string
2151       - description: anchor-name
2152         in: path
2153         name: anchor-name
2154         required: true
2155         schema:
2156           example: my-anchor
2157           type: string
2158       - description: target-anchor-name
2159         in: query
2160         name: target-anchor-name
2161         required: true
2162         schema:
2163           example: my-anchor
2164           type: string
2165       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2166         examples:
2167           container xpath:
2168             value: /shops/bookstore
2169           list attributes xpath:
2170             value: "/shops/bookstore/categories[@code=1]"
2171         in: query
2172         name: xpath
2173         required: false
2174         schema:
2175           default: /
2176           type: string
2177       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
2178           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
2179           \ number."
2180         in: query
2181         name: descendants
2182         required: false
2183         schema:
2184           default: none
2185           example: "3"
2186           type: string
2187       responses:
2188         "200":
2189           content:
2190             application/json:
2191               examples:
2192                 dataSample:
2193                   $ref: '#/components/examples/deltaReportSample'
2194                   value: null
2195               schema:
2196                 type: object
2197           description: OK
2198         "400":
2199           content:
2200             application/json:
2201               example:
2202                 status: 400
2203                 message: Bad Request
2204                 details: The provided request is not valid
2205               schema:
2206                 $ref: '#/components/schemas/ErrorMessage'
2207           description: Bad Request
2208         "401":
2209           content:
2210             application/json:
2211               example:
2212                 status: 401
2213                 message: Unauthorized request
2214                 details: This request is unauthorized
2215               schema:
2216                 $ref: '#/components/schemas/ErrorMessage'
2217           description: Unauthorized
2218         "403":
2219           content:
2220             application/json:
2221               example:
2222                 status: 403
2223                 message: Request Forbidden
2224                 details: This request is forbidden
2225               schema:
2226                 $ref: '#/components/schemas/ErrorMessage'
2227           description: Forbidden
2228         "500":
2229           content:
2230             application/json:
2231               example:
2232                 status: 500
2233                 message: Internal Server Error
2234                 details: Internal Server Error occurred
2235               schema:
2236                 $ref: '#/components/schemas/ErrorMessage'
2237           description: Internal Server Error
2238       summary: Get delta between anchors in the same dataspace
2239       tags:
2240       - cps-data
2241       x-codegen-request-body-name: xpath
2242   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2243     get:
2244       deprecated: true
2245       description: Query data nodes for the given dataspace and anchor using CPS path
2246       operationId: getNodesByDataspaceAndAnchorAndCpsPath
2247       parameters:
2248       - description: dataspace-name
2249         in: path
2250         name: dataspace-name
2251         required: true
2252         schema:
2253           example: my-dataspace
2254           type: string
2255       - description: anchor-name
2256         in: path
2257         name: anchor-name
2258         required: true
2259         schema:
2260           example: my-anchor
2261           type: string
2262       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2263         examples:
2264           container cps path:
2265             value: //bookstore
2266           list attributes cps path:
2267             value: "//categories[@code=1]"
2268         in: query
2269         name: cps-path
2270         required: false
2271         schema:
2272           default: /
2273           type: string
2274       - description: include-descendants
2275         in: query
2276         name: include-descendants
2277         required: false
2278         schema:
2279           default: false
2280           example: false
2281           type: boolean
2282       responses:
2283         "200":
2284           content:
2285             application/json:
2286               examples:
2287                 dataSample:
2288                   $ref: '#/components/examples/dataSample'
2289                   value: null
2290               schema:
2291                 type: object
2292           description: OK
2293         "400":
2294           content:
2295             application/json:
2296               example:
2297                 status: 400
2298                 message: Bad Request
2299                 details: The provided request is not valid
2300               schema:
2301                 $ref: '#/components/schemas/ErrorMessage'
2302           description: Bad Request
2303         "401":
2304           content:
2305             application/json:
2306               example:
2307                 status: 401
2308                 message: Unauthorized request
2309                 details: This request is unauthorized
2310               schema:
2311                 $ref: '#/components/schemas/ErrorMessage'
2312           description: Unauthorized
2313         "403":
2314           content:
2315             application/json:
2316               example:
2317                 status: 403
2318                 message: Request Forbidden
2319                 details: This request is forbidden
2320               schema:
2321                 $ref: '#/components/schemas/ErrorMessage'
2322           description: Forbidden
2323         "500":
2324           content:
2325             application/json:
2326               example:
2327                 status: 500
2328                 message: Internal Server Error
2329                 details: Internal Server Error occurred
2330               schema:
2331                 $ref: '#/components/schemas/ErrorMessage'
2332           description: Internal Server Error
2333       summary: Query data nodes
2334       tags:
2335       - cps-query
2336       x-codegen-request-body-name: xpath
2337   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2338     get:
2339       description: Query data nodes for the given dataspace and anchor using CPS path
2340       operationId: getNodesByDataspaceAndAnchorAndCpsPathV2
2341       parameters:
2342       - description: dataspace-name
2343         in: path
2344         name: dataspace-name
2345         required: true
2346         schema:
2347           example: my-dataspace
2348           type: string
2349       - description: anchor-name
2350         in: path
2351         name: anchor-name
2352         required: true
2353         schema:
2354           example: my-anchor
2355           type: string
2356       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2357         examples:
2358           container cps path:
2359             value: //bookstore
2360           list attributes cps path:
2361             value: "//categories[@code=1]"
2362         in: query
2363         name: cps-path
2364         required: false
2365         schema:
2366           default: /
2367           type: string
2368       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
2369           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
2370           \ number."
2371         in: query
2372         name: descendants
2373         required: false
2374         schema:
2375           default: none
2376           example: "3"
2377           type: string
2378       responses:
2379         "200":
2380           content:
2381             application/json:
2382               examples:
2383                 dataSample:
2384                   $ref: '#/components/examples/dataSample'
2385                   value: null
2386               schema:
2387                 type: object
2388           description: OK
2389         "400":
2390           content:
2391             application/json:
2392               example:
2393                 status: 400
2394                 message: Bad Request
2395                 details: The provided request is not valid
2396               schema:
2397                 $ref: '#/components/schemas/ErrorMessage'
2398           description: Bad Request
2399         "401":
2400           content:
2401             application/json:
2402               example:
2403                 status: 401
2404                 message: Unauthorized request
2405                 details: This request is unauthorized
2406               schema:
2407                 $ref: '#/components/schemas/ErrorMessage'
2408           description: Unauthorized
2409         "403":
2410           content:
2411             application/json:
2412               example:
2413                 status: 403
2414                 message: Request Forbidden
2415                 details: This request is forbidden
2416               schema:
2417                 $ref: '#/components/schemas/ErrorMessage'
2418           description: Forbidden
2419         "500":
2420           content:
2421             application/json:
2422               example:
2423                 status: 500
2424                 message: Internal Server Error
2425                 details: Internal Server Error occurred
2426               schema:
2427                 $ref: '#/components/schemas/ErrorMessage'
2428           description: Internal Server Error
2429       summary: Query data nodes
2430       tags:
2431       - cps-query
2432       x-codegen-request-body-name: xpath
2433   /v2/dataspaces/{dataspace-name}/nodes/query:
2434     get:
2435       description: Query data nodes for the given dataspace across anchors using CPS
2436         path
2437       operationId: getNodesByDataspaceAndCpsPath
2438       parameters:
2439       - description: dataspace-name
2440         in: path
2441         name: dataspace-name
2442         required: true
2443         schema:
2444           example: my-dataspace
2445           type: string
2446       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2447         examples:
2448           container cps path:
2449             value: //bookstore
2450           list attributes cps path:
2451             value: "//categories[@code=1]"
2452         in: query
2453         name: cps-path
2454         required: false
2455         schema:
2456           default: /
2457           type: string
2458       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
2459           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
2460           \ number."
2461         in: query
2462         name: descendants
2463         required: false
2464         schema:
2465           default: none
2466           example: "3"
2467           type: string
2468       - description: page index for pagination over anchors. It must be greater then
2469           zero if provided.
2470         in: query
2471         name: pageIndex
2472         required: false
2473         schema:
2474           example: 1
2475           type: integer
2476       - description: number of records (anchors) per page. It must be greater then
2477           zero if provided.
2478         in: query
2479         name: pageSize
2480         required: false
2481         schema:
2482           example: 10
2483           type: integer
2484       responses:
2485         "200":
2486           content:
2487             application/json:
2488               examples:
2489                 dataSample:
2490                   $ref: '#/components/examples/dataSampleAcrossAnchors'
2491                   value: null
2492               schema:
2493                 type: object
2494           description: OK
2495         "400":
2496           content:
2497             application/json:
2498               example:
2499                 status: 400
2500                 message: Bad Request
2501                 details: The provided request is not valid
2502               schema:
2503                 $ref: '#/components/schemas/ErrorMessage'
2504           description: Bad Request
2505         "401":
2506           content:
2507             application/json:
2508               example:
2509                 status: 401
2510                 message: Unauthorized request
2511                 details: This request is unauthorized
2512               schema:
2513                 $ref: '#/components/schemas/ErrorMessage'
2514           description: Unauthorized
2515         "403":
2516           content:
2517             application/json:
2518               example:
2519                 status: 403
2520                 message: Request Forbidden
2521                 details: This request is forbidden
2522               schema:
2523                 $ref: '#/components/schemas/ErrorMessage'
2524           description: Forbidden
2525         "500":
2526           content:
2527             application/json:
2528               example:
2529                 status: 500
2530                 message: Internal Server Error
2531                 details: Internal Server Error occurred
2532               schema:
2533                 $ref: '#/components/schemas/ErrorMessage'
2534           description: Internal Server Error
2535       summary: Query data nodes across anchors
2536       tags:
2537       - cps-query
2538       x-codegen-request-body-name: xpath
2539 components:
2540   examples:
2541     dataSample:
2542       value:
2543         test:bookstore:
2544           bookstore-name: Chapters
2545           categories:
2546           - code: 1
2547             name: SciFi
2548           - code: 2
2549             name: kids
2550     dataSampleXml:
2551       value: <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <bookstore xmlns="org:onap:ccsdk:sample">
2552         <bookstore-name>Chapters</bookstore-name> <categories> <code>1</code> <name>SciFi</name>
2553         </categories> </bookstore> </stores>
2554     deltaReportSample:
2555       value:
2556       - action: ADD
2557         xpath: "/bookstore/categories/[@code=3]"
2558         target-data:
2559           code: "3,"
2560           name: kidz
2561       - action: REMOVE
2562         xpath: "/bookstore/categories/[@code=1]"
2563         source-data:
2564           code: "1,"
2565           name: Fiction
2566       - action: UPDATE
2567         xpath: "/bookstore/categories/[@code=2]"
2568         source-data:
2569           name: Funny
2570         target-data:
2571           name: Comic
2572     dataSampleAcrossAnchors:
2573       value:
2574       - anchorName: bookstore1
2575         dataNode:
2576           test:bookstore:
2577             bookstore-name: Chapters
2578             categories:
2579             - code: 1
2580               name: SciFi
2581             - code: 2
2582               name: kids
2583       - anchorName: bookstore2
2584         dataNode:
2585           test:bookstore:
2586             bookstore-name: Chapters
2587             categories:
2588             - code: 1
2589               name: SciFi
2590             - code: 2
2591               name: kids
2592   parameters:
2593     dataspaceNameInQuery:
2594       description: dataspace-name
2595       in: query
2596       name: dataspace-name
2597       required: true
2598       schema:
2599         example: my-dataspace
2600         type: string
2601     apiVersionInPath:
2602       description: apiVersion
2603       in: path
2604       name: apiVersion
2605       required: true
2606       schema:
2607         default: v2
2608         enum:
2609         - v1
2610         - v2
2611         type: string
2612     dataspaceNameInPath:
2613       description: dataspace-name
2614       in: path
2615       name: dataspace-name
2616       required: true
2617       schema:
2618         example: my-dataspace
2619         type: string
2620     schemaSetNameInQuery:
2621       description: schema-set-name
2622       in: query
2623       name: schema-set-name
2624       required: true
2625       schema:
2626         example: my-schema-set
2627         type: string
2628     anchorNameInQuery:
2629       description: anchor-name
2630       in: query
2631       name: anchor-name
2632       required: true
2633       schema:
2634         example: my-anchor
2635         type: string
2636     anchorNameInPath:
2637       description: anchor-name
2638       in: path
2639       name: anchor-name
2640       required: true
2641       schema:
2642         example: my-anchor
2643         type: string
2644     schemaSetNameInPath:
2645       description: schema-set-name
2646       in: path
2647       name: schema-set-name
2648       required: true
2649       schema:
2650         example: my-schema-set
2651         type: string
2652     xpathInQuery:
2653       description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2654       examples:
2655         container xpath:
2656           value: /shops/bookstore
2657         list attributes xpath:
2658           value: "/shops/bookstore/categories[@code=1]"
2659       in: query
2660       name: xpath
2661       required: false
2662       schema:
2663         default: /
2664         type: string
2665     includeDescendantsOptionInQuery:
2666       description: include-descendants
2667       in: query
2668       name: include-descendants
2669       required: false
2670       schema:
2671         default: false
2672         example: false
2673         type: boolean
2674     descendantsInQuery:
2675       description: "Number of descendants to query. Allowed values are 'none', 'all',\
2676         \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive number."
2677       in: query
2678       name: descendants
2679       required: false
2680       schema:
2681         default: none
2682         example: "3"
2683         type: string
2684     observedTimestampInQuery:
2685       description: observed-timestamp
2686       in: query
2687       name: observed-timestamp
2688       required: false
2689       schema:
2690         example: 2021-03-21T00:10:34.030-0100
2691         type: string
2692     contentTypeHeader:
2693       description: Content type header
2694       in: header
2695       name: Content-Type
2696       required: true
2697       schema:
2698         example: application/json
2699         type: string
2700     requiredXpathInQuery:
2701       description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2702       examples:
2703         container xpath:
2704           value: /shops/bookstore
2705         list attributes xpath:
2706           value: "/shops/bookstore/categories[@code=1]"
2707       in: query
2708       name: xpath
2709       required: true
2710       schema:
2711         type: string
2712     targetAnchorNameInQuery:
2713       description: target-anchor-name
2714       in: query
2715       name: target-anchor-name
2716       required: true
2717       schema:
2718         example: my-anchor
2719         type: string
2720     cpsPathInQuery:
2721       description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2722       examples:
2723         container cps path:
2724           value: //bookstore
2725         list attributes cps path:
2726           value: "//categories[@code=1]"
2727       in: query
2728       name: cps-path
2729       required: false
2730       schema:
2731         default: /
2732         type: string
2733     pageIndexInQuery:
2734       description: page index for pagination over anchors. It must be greater then
2735         zero if provided.
2736       in: query
2737       name: pageIndex
2738       required: false
2739       schema:
2740         example: 1
2741         type: integer
2742     pageSizeInQuery:
2743       description: number of records (anchors) per page. It must be greater then zero
2744         if provided.
2745       in: query
2746       name: pageSize
2747       required: false
2748       schema:
2749         example: 10
2750         type: integer
2751   responses:
2752     Created:
2753       content:
2754         text/plain:
2755           schema:
2756             example: my-resource
2757             type: string
2758       description: Created
2759     BadRequest:
2760       content:
2761         application/json:
2762           example:
2763             status: 400
2764             message: Bad Request
2765             details: The provided request is not valid
2766           schema:
2767             $ref: '#/components/schemas/ErrorMessage'
2768       description: Bad Request
2769     Unauthorized:
2770       content:
2771         application/json:
2772           example:
2773             status: 401
2774             message: Unauthorized request
2775             details: This request is unauthorized
2776           schema:
2777             $ref: '#/components/schemas/ErrorMessage'
2778       description: Unauthorized
2779     Forbidden:
2780       content:
2781         application/json:
2782           example:
2783             status: 403
2784             message: Request Forbidden
2785             details: This request is forbidden
2786           schema:
2787             $ref: '#/components/schemas/ErrorMessage'
2788       description: Forbidden
2789     Conflict:
2790       content:
2791         application/json:
2792           example:
2793             status: 409
2794             message: Conflicting request
2795             details: The request cannot be processed as the resource is in use.
2796           schema:
2797             $ref: '#/components/schemas/ErrorMessage'
2798       description: Conflict
2799     InternalServerError:
2800       content:
2801         application/json:
2802           example:
2803             status: 500
2804             message: Internal Server Error
2805             details: Internal Server Error occurred
2806           schema:
2807             $ref: '#/components/schemas/ErrorMessage'
2808       description: Internal Server Error
2809     NoContent:
2810       content: {}
2811       description: No Content
2812     CreatedV2:
2813       description: Created without response body
2814     Ok:
2815       content:
2816         application/json:
2817           examples:
2818             dataSample:
2819               value: ""
2820           schema:
2821             type: object
2822       description: OK
2823   schemas:
2824     ErrorMessage:
2825       properties:
2826         status:
2827           type: string
2828         message:
2829           type: string
2830         details:
2831           type: string
2832       title: Error
2833       type: object
2834     DataspaceDetails:
2835       example:
2836         name: my-dataspace
2837       properties:
2838         name:
2839           example: my-dataspace
2840           type: string
2841       title: Dataspace details by dataspace Name
2842       type: object
2843     AnchorDetails:
2844       example:
2845         schemaSetName: my-schema-set
2846         dataspaceName: my-dataspace
2847         name: my-anchor
2848       properties:
2849         name:
2850           example: my-anchor
2851           type: string
2852         dataspaceName:
2853           example: my-dataspace
2854           type: string
2855         schemaSetName:
2856           example: my-schema-set
2857           type: string
2858       title: Anchor details by anchor Name
2859       type: object
2860     MultipartFile:
2861       properties:
2862         file:
2863           description: multipartFile
2864           format: binary
2865           type: string
2866       required:
2867       - file
2868       type: object
2869     SchemaSetDetails:
2870       example:
2871         dataspaceName: my-dataspace
2872         name: my-schema-set
2873         moduleReferences:
2874         - name: my-module-reference-name
2875           namespace: my-module-reference-namespace
2876           revision: my-module-reference-revision
2877         - name: my-module-reference-name
2878           namespace: my-module-reference-namespace
2879           revision: my-module-reference-revision
2880       properties:
2881         dataspaceName:
2882           example: my-dataspace
2883           type: string
2884         moduleReferences:
2885           items:
2886             $ref: '#/components/schemas/ModuleReferences'
2887           type: array
2888         name:
2889           example: my-schema-set
2890           type: string
2891       required:
2892       - moduleReferences
2893       title: Schema set details by dataspace and schemasetName
2894       type: object
2895     ModuleReferences:
2896       example:
2897         name: my-module-reference-name
2898         namespace: my-module-reference-namespace
2899         revision: my-module-reference-revision
2900       properties:
2901         name:
2902           example: my-module-reference-name
2903           type: string
2904         namespace:
2905           example: my-module-reference-namespace
2906           type: string
2907         revision:
2908           example: my-module-reference-revision
2909           type: string
2910       title: Module reference object
2911       type: object
2912   securitySchemes:
2913     basicAuth:
2914       scheme: basic
2915       type: http