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