b5a5332e56f3e6b985581fe00ee713e8e04f9119
[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
1724         a parent node xpath. This operation is currently supported for one top level
1725         data node only.
1726       operationId: updateNodeLeaves
1727       parameters:
1728       - name: apiVersion
1729         in: path
1730         description: apiVersion
1731         required: true
1732         schema:
1733           type: string
1734           default: v2
1735           enum:
1736           - v1
1737           - v2
1738       - name: dataspace-name
1739         in: path
1740         description: dataspace-name
1741         required: true
1742         schema:
1743           type: string
1744           example: my-dataspace
1745       - name: anchor-name
1746         in: path
1747         description: anchor-name
1748         required: true
1749         schema:
1750           type: string
1751           example: my-anchor
1752       - name: xpath
1753         in: query
1754         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1755         required: false
1756         schema:
1757           type: string
1758           default: /
1759         examples:
1760           container xpath:
1761             value: /shops/bookstore
1762           list attributes xpath:
1763             value: "/shops/bookstore/categories[@code=1]"
1764       - name: observed-timestamp
1765         in: query
1766         description: observed-timestamp
1767         required: false
1768         schema:
1769           type: string
1770           example: 2021-03-21T00:10:34.030-0100
1771       requestBody:
1772         content:
1773           application/json:
1774             schema:
1775               type: object
1776             examples:
1777               dataSample:
1778                 $ref: '#/components/examples/dataSample'
1779         required: true
1780       responses:
1781         "200":
1782           description: OK
1783           content:
1784             application/json:
1785               schema:
1786                 type: object
1787               examples:
1788                 dataSample:
1789                   value: ""
1790         "400":
1791           description: Bad Request
1792           content:
1793             application/json:
1794               schema:
1795                 $ref: '#/components/schemas/ErrorMessage'
1796               example:
1797                 status: 400
1798                 message: Bad Request
1799                 details: The provided request is not valid
1800         "401":
1801           description: Unauthorized
1802           content:
1803             application/json:
1804               schema:
1805                 $ref: '#/components/schemas/ErrorMessage'
1806               example:
1807                 status: 401
1808                 message: Unauthorized request
1809                 details: This request is unauthorized
1810         "403":
1811           description: Forbidden
1812           content:
1813             application/json:
1814               schema:
1815                 $ref: '#/components/schemas/ErrorMessage'
1816               example:
1817                 status: 403
1818                 message: Request Forbidden
1819                 details: This request is forbidden
1820         "500":
1821           description: Internal Server Error
1822           content:
1823             application/json:
1824               schema:
1825                 $ref: '#/components/schemas/ErrorMessage'
1826               example:
1827                 status: 500
1828                 message: Internal Server Error
1829                 details: Internal Server Error occurred
1830   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1831     delete:
1832       tags:
1833       - cps-data
1834       summary: Delete one or all list element(s)
1835       description: Delete one or all list element(s) for a given anchor and dataspace
1836       operationId: deleteListOrListElement
1837       parameters:
1838       - name: dataspace-name
1839         in: path
1840         description: dataspace-name
1841         required: true
1842         schema:
1843           type: string
1844           example: my-dataspace
1845       - name: anchor-name
1846         in: path
1847         description: anchor-name
1848         required: true
1849         schema:
1850           type: string
1851           example: my-anchor
1852       - name: xpath
1853         in: query
1854         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1855         required: true
1856         schema:
1857           type: string
1858         examples:
1859           container xpath:
1860             value: /shops/bookstore
1861           list attributes xpath:
1862             value: "/shops/bookstore/categories[@code=1]"
1863       - name: observed-timestamp
1864         in: query
1865         description: observed-timestamp
1866         required: false
1867         schema:
1868           type: string
1869           example: 2021-03-21T00:10:34.030-0100
1870       responses:
1871         "204":
1872           description: No Content
1873           content: {}
1874         "400":
1875           description: Bad Request
1876           content:
1877             application/json:
1878               schema:
1879                 $ref: '#/components/schemas/ErrorMessage'
1880               example:
1881                 status: 400
1882                 message: Bad Request
1883                 details: The provided request is not valid
1884         "401":
1885           description: Unauthorized
1886           content:
1887             application/json:
1888               schema:
1889                 $ref: '#/components/schemas/ErrorMessage'
1890               example:
1891                 status: 401
1892                 message: Unauthorized request
1893                 details: This request is unauthorized
1894         "403":
1895           description: Forbidden
1896           content:
1897             application/json:
1898               schema:
1899                 $ref: '#/components/schemas/ErrorMessage'
1900               example:
1901                 status: 403
1902                 message: Request Forbidden
1903                 details: This request is forbidden
1904         "500":
1905           description: Internal Server Error
1906           content:
1907             application/json:
1908               schema:
1909                 $ref: '#/components/schemas/ErrorMessage'
1910               example:
1911                 status: 500
1912                 message: Internal Server Error
1913                 details: Internal Server Error occurred
1914       deprecated: true
1915   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1916     put:
1917       tags:
1918       - cps-data
1919       summary: Replace list content
1920       description: "Replace list content under a given parent, anchor and dataspace"
1921       operationId: replaceListContent
1922       parameters:
1923       - name: apiVersion
1924         in: path
1925         description: apiVersion
1926         required: true
1927         schema:
1928           type: string
1929           default: v2
1930           enum:
1931           - v1
1932           - v2
1933       - name: dataspace-name
1934         in: path
1935         description: dataspace-name
1936         required: true
1937         schema:
1938           type: string
1939           example: my-dataspace
1940       - name: anchor-name
1941         in: path
1942         description: anchor-name
1943         required: true
1944         schema:
1945           type: string
1946           example: my-anchor
1947       - name: xpath
1948         in: query
1949         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1950         required: true
1951         schema:
1952           type: string
1953         examples:
1954           container xpath:
1955             value: /shops/bookstore
1956           list attributes xpath:
1957             value: "/shops/bookstore/categories[@code=1]"
1958       - name: observed-timestamp
1959         in: query
1960         description: observed-timestamp
1961         required: false
1962         schema:
1963           type: string
1964           example: 2021-03-21T00:10:34.030-0100
1965       requestBody:
1966         content:
1967           application/json:
1968             schema:
1969               type: object
1970             examples:
1971               dataSample:
1972                 $ref: '#/components/examples/dataSample'
1973         required: true
1974       responses:
1975         "200":
1976           description: OK
1977           content:
1978             application/json:
1979               schema:
1980                 type: object
1981               examples:
1982                 dataSample:
1983                   value: ""
1984         "400":
1985           description: Bad Request
1986           content:
1987             application/json:
1988               schema:
1989                 $ref: '#/components/schemas/ErrorMessage'
1990               example:
1991                 status: 400
1992                 message: Bad Request
1993                 details: The provided request is not valid
1994         "401":
1995           description: Unauthorized
1996           content:
1997             application/json:
1998               schema:
1999                 $ref: '#/components/schemas/ErrorMessage'
2000               example:
2001                 status: 401
2002                 message: Unauthorized request
2003                 details: This request is unauthorized
2004         "403":
2005           description: Forbidden
2006           content:
2007             application/json:
2008               schema:
2009                 $ref: '#/components/schemas/ErrorMessage'
2010               example:
2011                 status: 403
2012                 message: Request Forbidden
2013                 details: This request is forbidden
2014         "500":
2015           description: Internal Server Error
2016           content:
2017             application/json:
2018               schema:
2019                 $ref: '#/components/schemas/ErrorMessage'
2020               example:
2021                 status: 500
2022                 message: Internal Server Error
2023                 details: Internal Server Error occurred
2024     post:
2025       tags:
2026       - cps-data
2027       summary: Add list element(s)
2028       description: Add list element(s) to a list for a given anchor and dataspace
2029       operationId: addListElements
2030       parameters:
2031       - name: apiVersion
2032         in: path
2033         description: apiVersion
2034         required: true
2035         schema:
2036           type: string
2037           default: v2
2038           enum:
2039           - v1
2040           - v2
2041       - name: dataspace-name
2042         in: path
2043         description: dataspace-name
2044         required: true
2045         schema:
2046           type: string
2047           example: my-dataspace
2048       - name: anchor-name
2049         in: path
2050         description: anchor-name
2051         required: true
2052         schema:
2053           type: string
2054           example: my-anchor
2055       - name: xpath
2056         in: query
2057         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2058         required: true
2059         schema:
2060           type: string
2061         examples:
2062           container xpath:
2063             value: /shops/bookstore
2064           list attributes xpath:
2065             value: "/shops/bookstore/categories[@code=1]"
2066       - name: observed-timestamp
2067         in: query
2068         description: observed-timestamp
2069         required: false
2070         schema:
2071           type: string
2072           example: 2021-03-21T00:10:34.030-0100
2073       requestBody:
2074         content:
2075           application/json:
2076             schema:
2077               type: object
2078             examples:
2079               dataSample:
2080                 $ref: '#/components/examples/dataSample'
2081         required: true
2082       responses:
2083         "201":
2084           description: Created
2085           content:
2086             text/plain:
2087               schema:
2088                 type: string
2089                 example: my-resource
2090         "400":
2091           description: Bad Request
2092           content:
2093             application/json:
2094               schema:
2095                 $ref: '#/components/schemas/ErrorMessage'
2096               example:
2097                 status: 400
2098                 message: Bad Request
2099                 details: The provided request is not valid
2100         "401":
2101           description: Unauthorized
2102           content:
2103             application/json:
2104               schema:
2105                 $ref: '#/components/schemas/ErrorMessage'
2106               example:
2107                 status: 401
2108                 message: Unauthorized request
2109                 details: This request is unauthorized
2110         "403":
2111           description: Forbidden
2112           content:
2113             application/json:
2114               schema:
2115                 $ref: '#/components/schemas/ErrorMessage'
2116               example:
2117                 status: 403
2118                 message: Request Forbidden
2119                 details: This request is forbidden
2120         "500":
2121           description: Internal Server Error
2122           content:
2123             application/json:
2124               schema:
2125                 $ref: '#/components/schemas/ErrorMessage'
2126               example:
2127                 status: 500
2128                 message: Internal Server Error
2129                 details: Internal Server Error occurred
2130   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2131     get:
2132       tags:
2133       - cps-query
2134       summary: Query data nodes
2135       description: Query data nodes for the given dataspace and anchor using CPS path
2136       operationId: getNodesByDataspaceAndAnchorAndCpsPath
2137       parameters:
2138       - name: dataspace-name
2139         in: path
2140         description: dataspace-name
2141         required: true
2142         schema:
2143           type: string
2144           example: my-dataspace
2145       - name: anchor-name
2146         in: path
2147         description: anchor-name
2148         required: true
2149         schema:
2150           type: string
2151           example: my-anchor
2152       - name: cps-path
2153         in: query
2154         description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2155         required: false
2156         schema:
2157           type: string
2158           default: /
2159         examples:
2160           container cps path:
2161             value: //bookstore
2162           list attributes cps path:
2163             value: "//categories[@code=1]"
2164       - name: include-descendants
2165         in: query
2166         description: include-descendants
2167         required: false
2168         schema:
2169           type: boolean
2170           example: false
2171           default: false
2172       responses:
2173         "200":
2174           description: OK
2175           content:
2176             application/json:
2177               schema:
2178                 type: object
2179               examples:
2180                 dataSample:
2181                   $ref: '#/components/examples/dataSample'
2182         "400":
2183           description: Bad Request
2184           content:
2185             application/json:
2186               schema:
2187                 $ref: '#/components/schemas/ErrorMessage'
2188               example:
2189                 status: 400
2190                 message: Bad Request
2191                 details: The provided request is not valid
2192         "401":
2193           description: Unauthorized
2194           content:
2195             application/json:
2196               schema:
2197                 $ref: '#/components/schemas/ErrorMessage'
2198               example:
2199                 status: 401
2200                 message: Unauthorized request
2201                 details: This request is unauthorized
2202         "403":
2203           description: Forbidden
2204           content:
2205             application/json:
2206               schema:
2207                 $ref: '#/components/schemas/ErrorMessage'
2208               example:
2209                 status: 403
2210                 message: Request Forbidden
2211                 details: This request is forbidden
2212         "500":
2213           description: Internal Server Error
2214           content:
2215             application/json:
2216               schema:
2217                 $ref: '#/components/schemas/ErrorMessage'
2218               example:
2219                 status: 500
2220                 message: Internal Server Error
2221                 details: Internal Server Error occurred
2222       deprecated: true
2223       x-codegen-request-body-name: xpath
2224   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2225     get:
2226       tags:
2227       - cps-query
2228       summary: Query data nodes
2229       description: Query data nodes for the given dataspace and anchor using CPS path
2230       operationId: getNodesByDataspaceAndAnchorAndCpsPathV2
2231       parameters:
2232       - name: dataspace-name
2233         in: path
2234         description: dataspace-name
2235         required: true
2236         schema:
2237           type: string
2238           example: my-dataspace
2239       - name: anchor-name
2240         in: path
2241         description: anchor-name
2242         required: true
2243         schema:
2244           type: string
2245           example: my-anchor
2246       - name: cps-path
2247         in: query
2248         description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2249         required: false
2250         schema:
2251           type: string
2252           default: /
2253         examples:
2254           container cps path:
2255             value: //bookstore
2256           list attributes cps path:
2257             value: "//categories[@code=1]"
2258       - name: descendants
2259         in: query
2260         description: "Number of descendants to query. Allowed values are 'none', 'all',\
2261           \ -1 (for all), 0 (for none) and any positive number."
2262         required: false
2263         schema:
2264           type: string
2265           example: "3"
2266           default: none
2267       responses:
2268         "200":
2269           description: OK
2270           content:
2271             application/json:
2272               schema:
2273                 type: object
2274               examples:
2275                 dataSample:
2276                   $ref: '#/components/examples/dataSample'
2277         "400":
2278           description: Bad Request
2279           content:
2280             application/json:
2281               schema:
2282                 $ref: '#/components/schemas/ErrorMessage'
2283               example:
2284                 status: 400
2285                 message: Bad Request
2286                 details: The provided request is not valid
2287         "401":
2288           description: Unauthorized
2289           content:
2290             application/json:
2291               schema:
2292                 $ref: '#/components/schemas/ErrorMessage'
2293               example:
2294                 status: 401
2295                 message: Unauthorized request
2296                 details: This request is unauthorized
2297         "403":
2298           description: Forbidden
2299           content:
2300             application/json:
2301               schema:
2302                 $ref: '#/components/schemas/ErrorMessage'
2303               example:
2304                 status: 403
2305                 message: Request Forbidden
2306                 details: This request is forbidden
2307         "500":
2308           description: Internal Server Error
2309           content:
2310             application/json:
2311               schema:
2312                 $ref: '#/components/schemas/ErrorMessage'
2313               example:
2314                 status: 500
2315                 message: Internal Server Error
2316                 details: Internal Server Error occurred
2317       x-codegen-request-body-name: xpath
2318   /v2/dataspaces/{dataspace-name}/nodes/query:
2319     get:
2320       tags:
2321       - cps-query
2322       summary: Query data nodes
2323       description: Query data nodes for the given dataspace across anchors using CPS
2324         path
2325       operationId: getNodesByDataspaceAndCpsPath
2326       parameters:
2327       - name: dataspace-name
2328         in: path
2329         description: dataspace-name
2330         required: true
2331         schema:
2332           type: string
2333           example: my-dataspace
2334       - name: cps-path
2335         in: query
2336         description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2337         required: false
2338         schema:
2339           type: string
2340           default: /
2341         examples:
2342           container cps path:
2343             value: //bookstore
2344           list attributes cps path:
2345             value: "//categories[@code=1]"
2346       - name: descendants
2347         in: query
2348         description: "Number of descendants to query. Allowed values are 'none', 'all',\
2349           \ -1 (for all), 0 (for none) and any positive number."
2350         required: false
2351         schema:
2352           type: string
2353           example: "3"
2354           default: none
2355       responses:
2356         "200":
2357           description: OK
2358           content:
2359             application/json:
2360               schema:
2361                 type: object
2362               examples:
2363                 dataSample:
2364                   $ref: '#/components/examples/dataSampleAcrossAnchors'
2365         "400":
2366           description: Bad Request
2367           content:
2368             application/json:
2369               schema:
2370                 $ref: '#/components/schemas/ErrorMessage'
2371               example:
2372                 status: 400
2373                 message: Bad Request
2374                 details: The provided request is not valid
2375         "401":
2376           description: Unauthorized
2377           content:
2378             application/json:
2379               schema:
2380                 $ref: '#/components/schemas/ErrorMessage'
2381               example:
2382                 status: 401
2383                 message: Unauthorized request
2384                 details: This request is unauthorized
2385         "403":
2386           description: Forbidden
2387           content:
2388             application/json:
2389               schema:
2390                 $ref: '#/components/schemas/ErrorMessage'
2391               example:
2392                 status: 403
2393                 message: Request Forbidden
2394                 details: This request is forbidden
2395         "500":
2396           description: Internal Server Error
2397           content:
2398             application/json:
2399               schema:
2400                 $ref: '#/components/schemas/ErrorMessage'
2401               example:
2402                 status: 500
2403                 message: Internal Server Error
2404                 details: Internal Server Error occurred
2405       x-codegen-request-body-name: xpath
2406 components:
2407   schemas:
2408     ErrorMessage:
2409       title: Error
2410       type: object
2411       properties:
2412         status:
2413           type: string
2414         message:
2415           type: string
2416         details:
2417           type: string
2418     DataspaceDetails:
2419       title: Dataspace details by dataspace Name
2420       type: object
2421       properties:
2422         name:
2423           type: string
2424           example: my-dataspace
2425     AnchorDetails:
2426       title: Anchor details by anchor Name
2427       type: object
2428       properties:
2429         name:
2430           type: string
2431           example: my-anchor
2432         dataspaceName:
2433           type: string
2434           example: my-dataspace
2435         schemaSetName:
2436           type: string
2437           example: my-schema-set
2438     MultipartFile:
2439       required:
2440       - file
2441       type: object
2442       properties:
2443         file:
2444           type: string
2445           description: multipartFile
2446           format: binary
2447     SchemaSetDetails:
2448       title: Schema set details by dataspace and schemasetName
2449       required:
2450       - moduleReferences
2451       type: object
2452       properties:
2453         dataspaceName:
2454           type: string
2455           example: my-dataspace
2456         moduleReferences:
2457           type: array
2458           items:
2459             $ref: '#/components/schemas/ModuleReferences'
2460         name:
2461           type: string
2462           example: my-schema-set
2463     ModuleReferences:
2464       title: Module reference object
2465       type: object
2466       properties:
2467         name:
2468           type: string
2469           example: my-module-reference-name
2470         namespace:
2471           type: string
2472           example: my-module-reference-namespace
2473         revision:
2474           type: string
2475           example: my-module-reference-revision
2476   examples:
2477     dataSample:
2478       value:
2479         test:bookstore:
2480           bookstore-name: Chapters
2481           categories:
2482           - code: 1
2483             name: SciFi
2484           - code: 2
2485             name: kids
2486     dataSampleXml:
2487       value: <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <bookstore xmlns="org:onap:ccsdk:sample">
2488         <bookstore-name>Chapters</bookstore-name> <categories> <code>1</code> <name>SciFi</name>
2489         </categories> </bookstore> </stores>
2490     dataSampleAcrossAnchors:
2491       value:
2492       - anchorName: bookstore1
2493         dataNode:
2494           test:bookstore:
2495             bookstore-name: Chapters
2496             categories:
2497             - code: 1
2498               name: SciFi
2499             - code: 2
2500               name: kids
2501       - anchorName: bookstore2
2502         dataNode:
2503           test:bookstore:
2504             bookstore-name: Chapters
2505             categories:
2506             - code: 1
2507               name: SciFi
2508             - code: 2
2509               name: kids
2510   securitySchemes:
2511     basicAuth:
2512       type: http
2513       scheme: basic