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