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