53bc840ec767584283f66d983dbd6f9dea70c6ec
[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', -1 (for all), 0 (for none) and any positive number."
1324           required: false
1325           schema:
1326             type: string
1327             example: 3
1328             default: none
1329       responses:
1330         "200":
1331           description: OK
1332           content:
1333             application/json:
1334               schema:
1335                 type: object
1336               examples:
1337                 dataSample:
1338                   $ref: '#/components/examples/dataSample'
1339         "400":
1340           description: Bad Request
1341           content:
1342             application/json:
1343               schema:
1344                 $ref: '#/components/schemas/ErrorMessage'
1345               example:
1346                 status: 400
1347                 message: Bad Request
1348                 details: The provided request is not valid
1349         "401":
1350           description: Unauthorized
1351           content:
1352             application/json:
1353               schema:
1354                 $ref: '#/components/schemas/ErrorMessage'
1355               example:
1356                 status: 401
1357                 message: Unauthorized request
1358                 details: This request is unauthorized
1359         "403":
1360           description: Forbidden
1361           content:
1362             application/json:
1363               schema:
1364                 $ref: '#/components/schemas/ErrorMessage'
1365               example:
1366                 status: 403
1367                 message: Request Forbidden
1368                 details: This request is forbidden
1369         "500":
1370           description: Internal Server Error
1371           content:
1372             application/json:
1373               schema:
1374                 $ref: '#/components/schemas/ErrorMessage'
1375               example:
1376                 status: 500
1377                 message: Internal Server Error
1378                 details: Internal Server Error occurred
1379       x-codegen-request-body-name: xpath
1380   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
1381     put:
1382       tags:
1383         - cps-data
1384       summary: Replace a node with descendants
1385       description: "Replace a node with descendants for a given dataspace, anchor\
1386         \ and a parent node xpath"
1387       operationId: replaceNode
1388       parameters:
1389         - name: apiVersion
1390           in: path
1391           description: apiVersion
1392           required: true
1393           schema:
1394             type: string
1395             default: v2
1396             enum:
1397               - v1
1398               - v2
1399         - name: dataspace-name
1400           in: path
1401           description: dataspace-name
1402           required: true
1403           schema:
1404             type: string
1405             example: my-dataspace
1406         - name: anchor-name
1407           in: path
1408           description: anchor-name
1409           required: true
1410           schema:
1411             type: string
1412             example: my-anchor
1413         - name: xpath
1414           in: query
1415           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1416           required: false
1417           schema:
1418             type: string
1419             default: /
1420           examples:
1421             container xpath:
1422               value: /shops/bookstore
1423             list attributes xpath:
1424               value: "/shops/bookstore/categories[@code=1]"
1425         - name: observed-timestamp
1426           in: query
1427           description: observed-timestamp
1428           required: false
1429           schema:
1430             type: string
1431             example: 2021-03-21T00:10:34.030-0100
1432       requestBody:
1433         content:
1434           application/json:
1435             schema:
1436               type: object
1437             examples:
1438               dataSample:
1439                 $ref: '#/components/examples/dataSample'
1440         required: true
1441       responses:
1442         "200":
1443           description: OK
1444           content:
1445             application/json:
1446               schema:
1447                 type: object
1448               examples:
1449                 dataSample:
1450                   value: ""
1451         "400":
1452           description: Bad Request
1453           content:
1454             application/json:
1455               schema:
1456                 $ref: '#/components/schemas/ErrorMessage'
1457               example:
1458                 status: 400
1459                 message: Bad Request
1460                 details: The provided request is not valid
1461         "401":
1462           description: Unauthorized
1463           content:
1464             application/json:
1465               schema:
1466                 $ref: '#/components/schemas/ErrorMessage'
1467               example:
1468                 status: 401
1469                 message: Unauthorized request
1470                 details: This request is unauthorized
1471         "403":
1472           description: Forbidden
1473           content:
1474             application/json:
1475               schema:
1476                 $ref: '#/components/schemas/ErrorMessage'
1477               example:
1478                 status: 403
1479                 message: Request Forbidden
1480                 details: This request is forbidden
1481         "500":
1482           description: Internal Server Error
1483           content:
1484             application/json:
1485               schema:
1486                 $ref: '#/components/schemas/ErrorMessage'
1487               example:
1488                 status: 500
1489                 message: Internal Server Error
1490                 details: Internal Server Error occurred
1491     post:
1492       tags:
1493         - cps-data
1494       summary: Create a node
1495       description: Create a node for a given anchor and dataspace
1496       operationId: createNode
1497       parameters:
1498         - name: apiVersion
1499           in: path
1500           description: apiVersion
1501           required: true
1502           schema:
1503             type: string
1504             default: v2
1505             enum:
1506               - v1
1507               - v2
1508         - name: dataspace-name
1509           in: path
1510           description: dataspace-name
1511           required: true
1512           schema:
1513             type: string
1514             example: my-dataspace
1515         - name: anchor-name
1516           in: path
1517           description: anchor-name
1518           required: true
1519           schema:
1520             type: string
1521             example: my-anchor
1522         - name: xpath
1523           in: query
1524           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1525           required: false
1526           schema:
1527             type: string
1528             default: /
1529           examples:
1530             container xpath:
1531               value: /shops/bookstore
1532             list attributes xpath:
1533               value: "/shops/bookstore/categories[@code=1]"
1534         - name: observed-timestamp
1535           in: query
1536           description: observed-timestamp
1537           required: false
1538           schema:
1539             type: string
1540             example: 2021-03-21T00:10:34.030-0100
1541         - name: Content-Type
1542           in: header
1543           description: Content type header
1544           required: true
1545           schema:
1546             type: string
1547             example: application/json
1548       requestBody:
1549         content:
1550           application/json:
1551             schema:
1552               type: string
1553             examples:
1554               dataSample:
1555                 $ref: '#/components/examples/dataSample'
1556           application/xml:
1557             schema:
1558               type: object
1559               xml:
1560                 name: stores
1561             examples:
1562               dataSample:
1563                 $ref: '#/components/examples/dataSampleXml'
1564         required: true
1565       responses:
1566         "201":
1567           description: Created
1568           content:
1569             text/plain:
1570               schema:
1571                 type: string
1572                 example: my-resource
1573         "400":
1574           description: Bad Request
1575           content:
1576             application/json:
1577               schema:
1578                 $ref: '#/components/schemas/ErrorMessage'
1579               example:
1580                 status: 400
1581                 message: Bad Request
1582                 details: The provided request is not valid
1583         "401":
1584           description: Unauthorized
1585           content:
1586             application/json:
1587               schema:
1588                 $ref: '#/components/schemas/ErrorMessage'
1589               example:
1590                 status: 401
1591                 message: Unauthorized request
1592                 details: This request is unauthorized
1593         "403":
1594           description: Forbidden
1595           content:
1596             application/json:
1597               schema:
1598                 $ref: '#/components/schemas/ErrorMessage'
1599               example:
1600                 status: 403
1601                 message: Request Forbidden
1602                 details: This request is forbidden
1603         "409":
1604           description: Conflict
1605           content:
1606             application/json:
1607               schema:
1608                 $ref: '#/components/schemas/ErrorMessage'
1609               example:
1610                 status: 409
1611                 message: Conflicting request
1612                 details: The request cannot be processed as the resource is in use.
1613         "500":
1614           description: Internal Server Error
1615           content:
1616             application/json:
1617               schema:
1618                 $ref: '#/components/schemas/ErrorMessage'
1619               example:
1620                 status: 500
1621                 message: Internal Server Error
1622                 details: Internal Server Error occurred
1623     delete:
1624       tags:
1625         - cps-data
1626       summary: Delete a data node
1627       description: Delete a datanode for a given dataspace and anchor given a node
1628         xpath.
1629       operationId: deleteDataNode
1630       parameters:
1631         - name: apiVersion
1632           in: path
1633           description: apiVersion
1634           required: true
1635           schema:
1636             type: string
1637             default: v2
1638             enum:
1639               - v1
1640               - v2
1641         - name: dataspace-name
1642           in: path
1643           description: dataspace-name
1644           required: true
1645           schema:
1646             type: string
1647             example: my-dataspace
1648         - name: anchor-name
1649           in: path
1650           description: anchor-name
1651           required: true
1652           schema:
1653             type: string
1654             example: my-anchor
1655         - name: xpath
1656           in: query
1657           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1658           required: false
1659           schema:
1660             type: string
1661             default: /
1662           examples:
1663             container xpath:
1664               value: /shops/bookstore
1665             list attributes xpath:
1666               value: "/shops/bookstore/categories[@code=1]"
1667         - name: observed-timestamp
1668           in: query
1669           description: observed-timestamp
1670           required: false
1671           schema:
1672             type: string
1673             example: 2021-03-21T00:10:34.030-0100
1674       responses:
1675         "204":
1676           description: No Content
1677           content: {}
1678         "400":
1679           description: Bad Request
1680           content:
1681             application/json:
1682               schema:
1683                 $ref: '#/components/schemas/ErrorMessage'
1684               example:
1685                 status: 400
1686                 message: Bad Request
1687                 details: The provided request is not valid
1688         "401":
1689           description: Unauthorized
1690           content:
1691             application/json:
1692               schema:
1693                 $ref: '#/components/schemas/ErrorMessage'
1694               example:
1695                 status: 401
1696                 message: Unauthorized request
1697                 details: This request is unauthorized
1698         "403":
1699           description: Forbidden
1700           content:
1701             application/json:
1702               schema:
1703                 $ref: '#/components/schemas/ErrorMessage'
1704               example:
1705                 status: 403
1706                 message: Request Forbidden
1707                 details: This request is forbidden
1708         "500":
1709           description: Internal Server Error
1710           content:
1711             application/json:
1712               schema:
1713                 $ref: '#/components/schemas/ErrorMessage'
1714               example:
1715                 status: 500
1716                 message: Internal Server Error
1717                 details: Internal Server Error occurred
1718     patch:
1719       tags:
1720         - cps-data
1721       summary: Update node leaves
1722       description: Update a data node leaves for a given dataspace and anchor and
1723         a parent node xpath
1724       operationId: updateNodeLeaves
1725       parameters:
1726         - name: apiVersion
1727           in: path
1728           description: apiVersion
1729           required: true
1730           schema:
1731             type: string
1732             default: v2
1733             enum:
1734               - v1
1735               - v2
1736         - name: dataspace-name
1737           in: path
1738           description: dataspace-name
1739           required: true
1740           schema:
1741             type: string
1742             example: my-dataspace
1743         - name: anchor-name
1744           in: path
1745           description: anchor-name
1746           required: true
1747           schema:
1748             type: string
1749             example: my-anchor
1750         - name: xpath
1751           in: query
1752           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1753           required: false
1754           schema:
1755             type: string
1756             default: /
1757           examples:
1758             container xpath:
1759               value: /shops/bookstore
1760             list attributes xpath:
1761               value: "/shops/bookstore/categories[@code=1]"
1762         - name: observed-timestamp
1763           in: query
1764           description: observed-timestamp
1765           required: false
1766           schema:
1767             type: string
1768             example: 2021-03-21T00:10:34.030-0100
1769       requestBody:
1770         content:
1771           application/json:
1772             schema:
1773               type: object
1774             examples:
1775               dataSample:
1776                 $ref: '#/components/examples/dataSample'
1777         required: true
1778       responses:
1779         "200":
1780           description: OK
1781           content:
1782             application/json:
1783               schema:
1784                 type: object
1785               examples:
1786                 dataSample:
1787                   value: ""
1788         "400":
1789           description: Bad Request
1790           content:
1791             application/json:
1792               schema:
1793                 $ref: '#/components/schemas/ErrorMessage'
1794               example:
1795                 status: 400
1796                 message: Bad Request
1797                 details: The provided request is not valid
1798         "401":
1799           description: Unauthorized
1800           content:
1801             application/json:
1802               schema:
1803                 $ref: '#/components/schemas/ErrorMessage'
1804               example:
1805                 status: 401
1806                 message: Unauthorized request
1807                 details: This request is unauthorized
1808         "403":
1809           description: Forbidden
1810           content:
1811             application/json:
1812               schema:
1813                 $ref: '#/components/schemas/ErrorMessage'
1814               example:
1815                 status: 403
1816                 message: Request Forbidden
1817                 details: This request is forbidden
1818         "500":
1819           description: Internal Server Error
1820           content:
1821             application/json:
1822               schema:
1823                 $ref: '#/components/schemas/ErrorMessage'
1824               example:
1825                 status: 500
1826                 message: Internal Server Error
1827                 details: Internal Server Error occurred
1828   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1829     delete:
1830       tags:
1831         - cps-data
1832       summary: Delete one or all list element(s)
1833       description: Delete one or all list element(s) for a given anchor and dataspace
1834       operationId: deleteListOrListElement
1835       parameters:
1836         - name: dataspace-name
1837           in: path
1838           description: dataspace-name
1839           required: true
1840           schema:
1841             type: string
1842             example: my-dataspace
1843         - name: anchor-name
1844           in: path
1845           description: anchor-name
1846           required: true
1847           schema:
1848             type: string
1849             example: my-anchor
1850         - name: xpath
1851           in: query
1852           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1853           required: true
1854           schema:
1855             type: string
1856           examples:
1857             container xpath:
1858               value: /shops/bookstore
1859             list attributes xpath:
1860               value: "/shops/bookstore/categories[@code=1]"
1861         - name: observed-timestamp
1862           in: query
1863           description: observed-timestamp
1864           required: false
1865           schema:
1866             type: string
1867             example: 2021-03-21T00:10:34.030-0100
1868       responses:
1869         "204":
1870           description: No Content
1871           content: {}
1872         "400":
1873           description: Bad Request
1874           content:
1875             application/json:
1876               schema:
1877                 $ref: '#/components/schemas/ErrorMessage'
1878               example:
1879                 status: 400
1880                 message: Bad Request
1881                 details: The provided request is not valid
1882         "401":
1883           description: Unauthorized
1884           content:
1885             application/json:
1886               schema:
1887                 $ref: '#/components/schemas/ErrorMessage'
1888               example:
1889                 status: 401
1890                 message: Unauthorized request
1891                 details: This request is unauthorized
1892         "403":
1893           description: Forbidden
1894           content:
1895             application/json:
1896               schema:
1897                 $ref: '#/components/schemas/ErrorMessage'
1898               example:
1899                 status: 403
1900                 message: Request Forbidden
1901                 details: This request is forbidden
1902         "500":
1903           description: Internal Server Error
1904           content:
1905             application/json:
1906               schema:
1907                 $ref: '#/components/schemas/ErrorMessage'
1908               example:
1909                 status: 500
1910                 message: Internal Server Error
1911                 details: Internal Server Error occurred
1912       deprecated: true
1913   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1914     put:
1915       tags:
1916         - cps-data
1917       summary: Replace list content
1918       description: "Replace list content under a given parent, anchor and dataspace"
1919       operationId: replaceListContent
1920       parameters:
1921         - name: apiVersion
1922           in: path
1923           description: apiVersion
1924           required: true
1925           schema:
1926             type: string
1927             default: v2
1928             enum:
1929               - v1
1930               - v2
1931         - name: dataspace-name
1932           in: path
1933           description: dataspace-name
1934           required: true
1935           schema:
1936             type: string
1937             example: my-dataspace
1938         - name: anchor-name
1939           in: path
1940           description: anchor-name
1941           required: true
1942           schema:
1943             type: string
1944             example: my-anchor
1945         - name: xpath
1946           in: query
1947           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1948           required: true
1949           schema:
1950             type: string
1951           examples:
1952             container xpath:
1953               value: /shops/bookstore
1954             list attributes xpath:
1955               value: "/shops/bookstore/categories[@code=1]"
1956         - name: observed-timestamp
1957           in: query
1958           description: observed-timestamp
1959           required: false
1960           schema:
1961             type: string
1962             example: 2021-03-21T00:10:34.030-0100
1963       requestBody:
1964         content:
1965           application/json:
1966             schema:
1967               type: object
1968             examples:
1969               dataSample:
1970                 $ref: '#/components/examples/dataSample'
1971         required: true
1972       responses:
1973         "200":
1974           description: OK
1975           content:
1976             application/json:
1977               schema:
1978                 type: object
1979               examples:
1980                 dataSample:
1981                   value: ""
1982         "400":
1983           description: Bad Request
1984           content:
1985             application/json:
1986               schema:
1987                 $ref: '#/components/schemas/ErrorMessage'
1988               example:
1989                 status: 400
1990                 message: Bad Request
1991                 details: The provided request is not valid
1992         "401":
1993           description: Unauthorized
1994           content:
1995             application/json:
1996               schema:
1997                 $ref: '#/components/schemas/ErrorMessage'
1998               example:
1999                 status: 401
2000                 message: Unauthorized request
2001                 details: This request is unauthorized
2002         "403":
2003           description: Forbidden
2004           content:
2005             application/json:
2006               schema:
2007                 $ref: '#/components/schemas/ErrorMessage'
2008               example:
2009                 status: 403
2010                 message: Request Forbidden
2011                 details: This request is forbidden
2012         "500":
2013           description: Internal Server Error
2014           content:
2015             application/json:
2016               schema:
2017                 $ref: '#/components/schemas/ErrorMessage'
2018               example:
2019                 status: 500
2020                 message: Internal Server Error
2021                 details: Internal Server Error occurred
2022     post:
2023       tags:
2024         - cps-data
2025       summary: Add list element(s)
2026       description: Add list element(s) to a list for a given anchor and dataspace
2027       operationId: addListElements
2028       parameters:
2029         - name: apiVersion
2030           in: path
2031           description: apiVersion
2032           required: true
2033           schema:
2034             type: string
2035             default: v2
2036             enum:
2037               - v1
2038               - v2
2039         - name: dataspace-name
2040           in: path
2041           description: dataspace-name
2042           required: true
2043           schema:
2044             type: string
2045             example: my-dataspace
2046         - name: anchor-name
2047           in: path
2048           description: anchor-name
2049           required: true
2050           schema:
2051             type: string
2052             example: my-anchor
2053         - name: xpath
2054           in: query
2055           description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2056           required: true
2057           schema:
2058             type: string
2059           examples:
2060             container xpath:
2061               value: /shops/bookstore
2062             list attributes xpath:
2063               value: "/shops/bookstore/categories[@code=1]"
2064         - name: observed-timestamp
2065           in: query
2066           description: observed-timestamp
2067           required: false
2068           schema:
2069             type: string
2070             example: 2021-03-21T00:10:34.030-0100
2071       requestBody:
2072         content:
2073           application/json:
2074             schema:
2075               type: object
2076             examples:
2077               dataSample:
2078                 $ref: '#/components/examples/dataSample'
2079         required: true
2080       responses:
2081         "201":
2082           description: Created
2083           content:
2084             text/plain:
2085               schema:
2086                 type: string
2087                 example: my-resource
2088         "400":
2089           description: Bad Request
2090           content:
2091             application/json:
2092               schema:
2093                 $ref: '#/components/schemas/ErrorMessage'
2094               example:
2095                 status: 400
2096                 message: Bad Request
2097                 details: The provided request is not valid
2098         "401":
2099           description: Unauthorized
2100           content:
2101             application/json:
2102               schema:
2103                 $ref: '#/components/schemas/ErrorMessage'
2104               example:
2105                 status: 401
2106                 message: Unauthorized request
2107                 details: This request is unauthorized
2108         "403":
2109           description: Forbidden
2110           content:
2111             application/json:
2112               schema:
2113                 $ref: '#/components/schemas/ErrorMessage'
2114               example:
2115                 status: 403
2116                 message: Request Forbidden
2117                 details: This request is forbidden
2118         "500":
2119           description: Internal Server Error
2120           content:
2121             application/json:
2122               schema:
2123                 $ref: '#/components/schemas/ErrorMessage'
2124               example:
2125                 status: 500
2126                 message: Internal Server Error
2127                 details: Internal Server Error occurred
2128   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2129     get:
2130       tags:
2131         - cps-query
2132       summary: Query data nodes
2133       description: Query data nodes for the given dataspace and anchor using CPS path
2134       operationId: getNodesByDataspaceAndAnchorAndCpsPath
2135       parameters:
2136         - name: dataspace-name
2137           in: path
2138           description: dataspace-name
2139           required: true
2140           schema:
2141             type: string
2142             example: my-dataspace
2143         - name: anchor-name
2144           in: path
2145           description: anchor-name
2146           required: true
2147           schema:
2148             type: string
2149             example: my-anchor
2150         - name: cps-path
2151           in: query
2152           description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2153           required: false
2154           schema:
2155             type: string
2156             default: /
2157           examples:
2158             container cps path:
2159               value: //bookstore
2160             list attributes cps path:
2161               value: "//categories[@code=1]"
2162         - name: include-descendants
2163           in: query
2164           description: include-descendants
2165           required: false
2166           schema:
2167             type: boolean
2168             example: false
2169             default: false
2170       responses:
2171         "200":
2172           description: OK
2173           content:
2174             application/json:
2175               schema:
2176                 type: object
2177               examples:
2178                 dataSample:
2179                   $ref: '#/components/examples/dataSample'
2180         "400":
2181           description: Bad Request
2182           content:
2183             application/json:
2184               schema:
2185                 $ref: '#/components/schemas/ErrorMessage'
2186               example:
2187                 status: 400
2188                 message: Bad Request
2189                 details: The provided request is not valid
2190         "401":
2191           description: Unauthorized
2192           content:
2193             application/json:
2194               schema:
2195                 $ref: '#/components/schemas/ErrorMessage'
2196               example:
2197                 status: 401
2198                 message: Unauthorized request
2199                 details: This request is unauthorized
2200         "403":
2201           description: Forbidden
2202           content:
2203             application/json:
2204               schema:
2205                 $ref: '#/components/schemas/ErrorMessage'
2206               example:
2207                 status: 403
2208                 message: Request Forbidden
2209                 details: This request is forbidden
2210         "500":
2211           description: Internal Server Error
2212           content:
2213             application/json:
2214               schema:
2215                 $ref: '#/components/schemas/ErrorMessage'
2216               example:
2217                 status: 500
2218                 message: Internal Server Error
2219                 details: Internal Server Error occurred
2220       deprecated: true
2221       x-codegen-request-body-name: xpath
2222   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2223     get:
2224       tags:
2225         - cps-query
2226       summary: Query data nodes
2227       description: Query data nodes for the given dataspace and anchor using CPS path
2228       operationId: getNodesByDataspaceAndAnchorAndCpsPathV2
2229       parameters:
2230         - name: dataspace-name
2231           in: path
2232           description: dataspace-name
2233           required: true
2234           schema:
2235             type: string
2236             example: my-dataspace
2237         - name: anchor-name
2238           in: path
2239           description: anchor-name
2240           required: true
2241           schema:
2242             type: string
2243             example: my-anchor
2244         - name: cps-path
2245           in: query
2246           description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2247           required: false
2248           schema:
2249             type: string
2250             default: /
2251           examples:
2252             container cps path:
2253               value: //bookstore
2254             list attributes cps path:
2255               value: "//categories[@code=1]"
2256         - name: descendants
2257           in: query
2258           description: "descendents to query depth of children. allowed values are none,\
2259           \ all, any number starting from -1"
2260           required: false
2261           schema:
2262             type: string
2263             example: "3"
2264             default: none
2265       responses:
2266         "200":
2267           description: OK
2268           content:
2269             application/json:
2270               schema:
2271                 type: object
2272               examples:
2273                 dataSample:
2274                   $ref: '#/components/examples/dataSample'
2275         "400":
2276           description: Bad Request
2277           content:
2278             application/json:
2279               schema:
2280                 $ref: '#/components/schemas/ErrorMessage'
2281               example:
2282                 status: 400
2283                 message: Bad Request
2284                 details: The provided request is not valid
2285         "401":
2286           description: Unauthorized
2287           content:
2288             application/json:
2289               schema:
2290                 $ref: '#/components/schemas/ErrorMessage'
2291               example:
2292                 status: 401
2293                 message: Unauthorized request
2294                 details: This request is unauthorized
2295         "403":
2296           description: Forbidden
2297           content:
2298             application/json:
2299               schema:
2300                 $ref: '#/components/schemas/ErrorMessage'
2301               example:
2302                 status: 403
2303                 message: Request Forbidden
2304                 details: This request is forbidden
2305         "500":
2306           description: Internal Server Error
2307           content:
2308             application/json:
2309               schema:
2310                 $ref: '#/components/schemas/ErrorMessage'
2311               example:
2312                 status: 500
2313                 message: Internal Server Error
2314                 details: Internal Server Error occurred
2315       x-codegen-request-body-name: xpath
2316 components:
2317   schemas:
2318     ErrorMessage:
2319       title: Error
2320       type: object
2321       properties:
2322         status:
2323           type: string
2324         message:
2325           type: string
2326         details:
2327           type: string
2328     DataspaceDetails:
2329       title: Dataspace details by dataspace Name
2330       type: object
2331       properties:
2332         name:
2333           type: string
2334           example: my-dataspace
2335     AnchorDetails:
2336       title: Anchor details by anchor Name
2337       type: object
2338       properties:
2339         name:
2340           type: string
2341           example: my-anchor
2342         dataspaceName:
2343           type: string
2344           example: my-dataspace
2345         schemaSetName:
2346           type: string
2347           example: my-schema-set
2348     MultipartFile:
2349       required:
2350         - file
2351       type: object
2352       properties:
2353         file:
2354           type: string
2355           description: multipartFile
2356           format: binary
2357     SchemaSetDetails:
2358       title: Schema set details by dataspace and schemasetName
2359       required:
2360         - moduleReferences
2361       type: object
2362       properties:
2363         dataspaceName:
2364           type: string
2365           example: my-dataspace
2366         moduleReferences:
2367           type: array
2368           items:
2369             $ref: '#/components/schemas/ModuleReferences'
2370         name:
2371           type: string
2372           example: my-schema-set
2373     ModuleReferences:
2374       title: Module reference object
2375       type: object
2376       properties:
2377         name:
2378           type: string
2379           example: my-module-reference-name
2380         namespace:
2381           type: string
2382           example: my-module-reference-namespace
2383         revision:
2384           type: string
2385           example: my-module-reference-revision
2386   examples:
2387     dataSample:
2388       value:
2389         test:bookstore:
2390           bookstore-name: Chapters
2391           categories:
2392             - code: 1
2393               name: SciFi
2394             - code: 2
2395               name: kids
2396     dataSampleXml:
2397       value: <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <bookstore xmlns="org:onap:ccsdk:sample">
2398         <bookstore-name>Chapters</bookstore-name> <categories> <code>1</code> <name>SciFi</name>
2399         </categories> </bookstore> </stores>
2400   securitySchemes:
2401     basicAuth:
2402       type: http
2403       scheme: basic