Create primary documentation for Jakarta release
[cps.git] / docs / api / swagger / cps / openapi.yaml
1 openapi: 3.0.1
2 info:
3   title: ONAP Open API v3 Configuration Persistence Service
4   description: Configuration Persistence Service is a Model Driven Generic Database
5   contact:
6     name: ONAP
7     url: https://onap.readthedocs.io
8     email: onap-discuss@lists.onap.org
9   license:
10     name: Apache 2.0
11     url: http://www.apache.org/licenses/LICENSE-2.0
12   version: 1.0.0
13   x-planned-retirement-date: "202212"
14   x-component: Modeling
15   x-logo:
16     url: cps_logo.png
17 servers:
18 - url: /cps/api
19 tags:
20 - name: cps-admin
21   description: cps Admin
22 - name: cps-data
23   description: cps Data
24 paths:
25   /v1/dataspaces:
26     post:
27       tags:
28       - cps-admin
29       summary: Create a dataspace
30       description: Create a new dataspace
31       operationId: createDataspace
32       parameters:
33       - name: dataspace-name
34         in: query
35         description: dataspace-name
36         required: true
37         schema:
38           type: string
39           example: my-dataspace
40       responses:
41         "201":
42           description: Created
43           content:
44             text/plain:
45               schema:
46                 type: string
47                 example: my-resource
48         "401":
49           description: Unauthorized
50           content:
51             application/json:
52               schema:
53                 $ref: '#/components/schemas/ErrorMessage'
54               example:
55                 status: 401
56                 message: Unauthorized request
57                 details: This request is unauthorized
58         "403":
59           description: Forbidden
60           content:
61             application/json:
62               schema:
63                 $ref: '#/components/schemas/ErrorMessage'
64               example:
65                 status: 403
66                 message: Request Forbidden
67                 details: This request is forbidden
68         "409":
69           description: Conflict
70           content:
71             application/json:
72               schema:
73                 $ref: '#/components/schemas/ErrorMessage'
74               example:
75                 status: 409
76                 message: Conflicting request
77                 details: The request cannot be processed as the resource is in use.
78         "500":
79           description: Internal Server Error
80           content:
81             application/json:
82               schema:
83                 $ref: '#/components/schemas/ErrorMessage'
84               example:
85                 status: 500
86                 message: Internal Server Error
87                 details: Internal Server Error occurred
88     delete:
89       tags:
90       - cps-admin
91       summary: Delete a dataspace
92       description: Delete a dataspace
93       operationId: deleteDataspace
94       parameters:
95       - name: dataspace-name
96         in: query
97         description: dataspace-name
98         required: true
99         schema:
100           type: string
101           example: my-dataspace
102       responses:
103         "204":
104           description: No Content
105           content: {}
106         "400":
107           description: Bad Request
108           content:
109             application/json:
110               schema:
111                 $ref: '#/components/schemas/ErrorMessage'
112               example:
113                 status: 400
114                 message: Bad Request
115                 details: The provided request is not valid
116         "401":
117           description: Unauthorized
118           content:
119             application/json:
120               schema:
121                 $ref: '#/components/schemas/ErrorMessage'
122               example:
123                 status: 401
124                 message: Unauthorized request
125                 details: This request is unauthorized
126         "403":
127           description: Forbidden
128           content:
129             application/json:
130               schema:
131                 $ref: '#/components/schemas/ErrorMessage'
132               example:
133                 status: 403
134                 message: Request Forbidden
135                 details: This request is forbidden
136         "409":
137           description: Conflict
138           content:
139             application/json:
140               schema:
141                 $ref: '#/components/schemas/ErrorMessage'
142               example:
143                 status: 409
144                 message: Conflicting request
145                 details: The request cannot be processed as the resource is in use.
146         "500":
147           description: Internal Server Error
148           content:
149             application/json:
150               schema:
151                 $ref: '#/components/schemas/ErrorMessage'
152               example:
153                 status: 500
154                 message: Internal Server Error
155                 details: Internal Server Error occurred
156   /v1/dataspaces/{dataspace-name}/anchors:
157     get:
158       tags:
159       - cps-admin
160       summary: Get anchors
161       description: "Read all anchors, given a dataspace"
162       operationId: getAnchors
163       parameters:
164       - name: dataspace-name
165         in: path
166         description: dataspace-name
167         required: true
168         schema:
169           type: string
170           example: my-dataspace
171       responses:
172         "200":
173           description: OK
174           content:
175             application/json:
176               schema:
177                 type: array
178                 items:
179                   $ref: '#/components/schemas/AnchorDetails'
180         "400":
181           description: Bad Request
182           content:
183             application/json:
184               schema:
185                 $ref: '#/components/schemas/ErrorMessage'
186               example:
187                 status: 400
188                 message: Bad Request
189                 details: The provided request is not valid
190         "401":
191           description: Unauthorized
192           content:
193             application/json:
194               schema:
195                 $ref: '#/components/schemas/ErrorMessage'
196               example:
197                 status: 401
198                 message: Unauthorized request
199                 details: This request is unauthorized
200         "403":
201           description: Forbidden
202           content:
203             application/json:
204               schema:
205                 $ref: '#/components/schemas/ErrorMessage'
206               example:
207                 status: 403
208                 message: Request Forbidden
209                 details: This request is forbidden
210         "500":
211           description: Internal Server Error
212           content:
213             application/json:
214               schema:
215                 $ref: '#/components/schemas/ErrorMessage'
216               example:
217                 status: 500
218                 message: Internal Server Error
219                 details: Internal Server Error occurred
220     post:
221       tags:
222       - cps-admin
223       summary: Create an anchor
224       description: Create a new anchor in the given dataspace
225       operationId: createAnchor
226       parameters:
227       - name: dataspace-name
228         in: path
229         description: dataspace-name
230         required: true
231         schema:
232           type: string
233           example: my-dataspace
234       - name: schema-set-name
235         in: query
236         description: schema-set-name
237         required: true
238         schema:
239           type: string
240           example: my-schema-set
241       - name: anchor-name
242         in: query
243         description: anchor-name
244         required: true
245         schema:
246           type: string
247           example: my-anchor
248       responses:
249         "201":
250           description: Created
251           content:
252             text/plain:
253               schema:
254                 type: string
255                 example: my-resource
256         "400":
257           description: Bad Request
258           content:
259             application/json:
260               schema:
261                 $ref: '#/components/schemas/ErrorMessage'
262               example:
263                 status: 400
264                 message: Bad Request
265                 details: The provided request is not valid
266         "401":
267           description: Unauthorized
268           content:
269             application/json:
270               schema:
271                 $ref: '#/components/schemas/ErrorMessage'
272               example:
273                 status: 401
274                 message: Unauthorized request
275                 details: This request is unauthorized
276         "403":
277           description: Forbidden
278           content:
279             application/json:
280               schema:
281                 $ref: '#/components/schemas/ErrorMessage'
282               example:
283                 status: 403
284                 message: Request Forbidden
285                 details: This request is forbidden
286         "409":
287           description: Conflict
288           content:
289             application/json:
290               schema:
291                 $ref: '#/components/schemas/ErrorMessage'
292               example:
293                 status: 409
294                 message: Conflicting request
295                 details: The request cannot be processed as the resource is in use.
296         "500":
297           description: Internal Server Error
298           content:
299             application/json:
300               schema:
301                 $ref: '#/components/schemas/ErrorMessage'
302               example:
303                 status: 500
304                 message: Internal Server Error
305                 details: Internal Server Error occurred
306   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
307     get:
308       tags:
309       - cps-admin
310       summary: Get an anchor
311       description: Read an anchor given an anchor name and a dataspace
312       operationId: getAnchor
313       parameters:
314       - name: dataspace-name
315         in: path
316         description: dataspace-name
317         required: true
318         schema:
319           type: string
320           example: my-dataspace
321       - name: anchor-name
322         in: path
323         description: anchor-name
324         required: true
325         schema:
326           type: string
327           example: my-anchor
328       responses:
329         "200":
330           description: OK
331           content:
332             application/json:
333               schema:
334                 $ref: '#/components/schemas/AnchorDetails'
335         "400":
336           description: Bad Request
337           content:
338             application/json:
339               schema:
340                 $ref: '#/components/schemas/ErrorMessage'
341               example:
342                 status: 400
343                 message: Bad Request
344                 details: The provided request is not valid
345         "401":
346           description: Unauthorized
347           content:
348             application/json:
349               schema:
350                 $ref: '#/components/schemas/ErrorMessage'
351               example:
352                 status: 401
353                 message: Unauthorized request
354                 details: This request is unauthorized
355         "403":
356           description: Forbidden
357           content:
358             application/json:
359               schema:
360                 $ref: '#/components/schemas/ErrorMessage'
361               example:
362                 status: 403
363                 message: Request Forbidden
364                 details: This request is forbidden
365         "500":
366           description: Internal Server Error
367           content:
368             application/json:
369               schema:
370                 $ref: '#/components/schemas/ErrorMessage'
371               example:
372                 status: 500
373                 message: Internal Server Error
374                 details: Internal Server Error occurred
375     delete:
376       tags:
377       - cps-admin
378       summary: Delete an anchor
379       description: Delete an anchor given an anchor name and a dataspace
380       operationId: deleteAnchor
381       parameters:
382       - name: dataspace-name
383         in: path
384         description: dataspace-name
385         required: true
386         schema:
387           type: string
388           example: my-dataspace
389       - name: anchor-name
390         in: path
391         description: anchor-name
392         required: true
393         schema:
394           type: string
395           example: my-anchor
396       responses:
397         "204":
398           description: No Content
399           content: {}
400         "400":
401           description: Bad Request
402           content:
403             application/json:
404               schema:
405                 $ref: '#/components/schemas/ErrorMessage'
406               example:
407                 status: 400
408                 message: Bad Request
409                 details: The provided request is not valid
410         "401":
411           description: Unauthorized
412           content:
413             application/json:
414               schema:
415                 $ref: '#/components/schemas/ErrorMessage'
416               example:
417                 status: 401
418                 message: Unauthorized request
419                 details: This request is unauthorized
420         "403":
421           description: Forbidden
422           content:
423             application/json:
424               schema:
425                 $ref: '#/components/schemas/ErrorMessage'
426               example:
427                 status: 403
428                 message: Request Forbidden
429                 details: This request is forbidden
430         "500":
431           description: Internal Server Error
432           content:
433             application/json:
434               schema:
435                 $ref: '#/components/schemas/ErrorMessage'
436               example:
437                 status: 500
438                 message: Internal Server Error
439                 details: Internal Server Error occurred
440   /v1/dataspaces/{dataspace-name}/schema-sets:
441     post:
442       tags:
443       - cps-admin
444       summary: Create a schema set
445       description: Create a new schema set in the given dataspace
446       operationId: createSchemaSet
447       parameters:
448       - name: dataspace-name
449         in: path
450         description: dataspace-name
451         required: true
452         schema:
453           type: string
454           example: my-dataspace
455       - name: schema-set-name
456         in: query
457         description: schema-set-name
458         required: true
459         schema:
460           type: string
461           example: my-schema-set
462       requestBody:
463         content:
464           multipart/form-data:
465             schema:
466               $ref: '#/components/schemas/MultipartFile'
467         required: true
468       responses:
469         "201":
470           description: Created
471           content:
472             text/plain:
473               schema:
474                 type: string
475                 example: my-resource
476         "400":
477           description: Bad Request
478           content:
479             application/json:
480               schema:
481                 $ref: '#/components/schemas/ErrorMessage'
482               example:
483                 status: 400
484                 message: Bad Request
485                 details: The provided request is not valid
486         "401":
487           description: Unauthorized
488           content:
489             application/json:
490               schema:
491                 $ref: '#/components/schemas/ErrorMessage'
492               example:
493                 status: 401
494                 message: Unauthorized request
495                 details: This request is unauthorized
496         "403":
497           description: Forbidden
498           content:
499             application/json:
500               schema:
501                 $ref: '#/components/schemas/ErrorMessage'
502               example:
503                 status: 403
504                 message: Request Forbidden
505                 details: This request is forbidden
506         "409":
507           description: Conflict
508           content:
509             application/json:
510               schema:
511                 $ref: '#/components/schemas/ErrorMessage'
512               example:
513                 status: 409
514                 message: Conflicting request
515                 details: The request cannot be processed as the resource is in use.
516         "500":
517           description: Internal Server Error
518           content:
519             application/json:
520               schema:
521                 $ref: '#/components/schemas/ErrorMessage'
522               example:
523                 status: 500
524                 message: Internal Server Error
525                 details: Internal Server Error occurred
526   /v1/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}:
527     get:
528       tags:
529       - cps-admin
530       summary: Get a schema set
531       description: Read a schema set given a schema set name and a dataspace
532       operationId: getSchemaSet
533       parameters:
534       - name: dataspace-name
535         in: path
536         description: dataspace-name
537         required: true
538         schema:
539           type: string
540           example: my-dataspace
541       - name: schema-set-name
542         in: path
543         description: schema-set-name
544         required: true
545         schema:
546           type: string
547           example: my-schema-set
548       responses:
549         "200":
550           description: OK
551           content:
552             application/json:
553               schema:
554                 $ref: '#/components/schemas/SchemaSetDetails'
555         "400":
556           description: Bad Request
557           content:
558             application/json:
559               schema:
560                 $ref: '#/components/schemas/ErrorMessage'
561               example:
562                 status: 400
563                 message: Bad Request
564                 details: The provided request is not valid
565         "401":
566           description: Unauthorized
567           content:
568             application/json:
569               schema:
570                 $ref: '#/components/schemas/ErrorMessage'
571               example:
572                 status: 401
573                 message: Unauthorized request
574                 details: This request is unauthorized
575         "403":
576           description: Forbidden
577           content:
578             application/json:
579               schema:
580                 $ref: '#/components/schemas/ErrorMessage'
581               example:
582                 status: 403
583                 message: Request Forbidden
584                 details: This request is forbidden
585         "500":
586           description: Internal Server Error
587           content:
588             application/json:
589               schema:
590                 $ref: '#/components/schemas/ErrorMessage'
591               example:
592                 status: 500
593                 message: Internal Server Error
594                 details: Internal Server Error occurred
595     delete:
596       tags:
597       - cps-admin
598       summary: Delete a schema set
599       description: Delete a schema set given a schema set name and a dataspace
600       operationId: deleteSchemaSet
601       parameters:
602       - name: dataspace-name
603         in: path
604         description: dataspace-name
605         required: true
606         schema:
607           type: string
608           example: my-dataspace
609       - name: schema-set-name
610         in: path
611         description: schema-set-name
612         required: true
613         schema:
614           type: string
615           example: my-schema-set
616       responses:
617         "204":
618           description: No Content
619           content: {}
620         "400":
621           description: Bad Request
622           content:
623             application/json:
624               schema:
625                 $ref: '#/components/schemas/ErrorMessage'
626               example:
627                 status: 400
628                 message: Bad Request
629                 details: The provided request is not valid
630         "401":
631           description: Unauthorized
632           content:
633             application/json:
634               schema:
635                 $ref: '#/components/schemas/ErrorMessage'
636               example:
637                 status: 401
638                 message: Unauthorized request
639                 details: This request is unauthorized
640         "403":
641           description: Forbidden
642           content:
643             application/json:
644               schema:
645                 $ref: '#/components/schemas/ErrorMessage'
646               example:
647                 status: 403
648                 message: Request Forbidden
649                 details: This request is forbidden
650         "409":
651           description: Conflict
652           content:
653             application/json:
654               schema:
655                 $ref: '#/components/schemas/ErrorMessage'
656               example:
657                 status: 409
658                 message: Conflicting request
659                 details: The request cannot be processed as the resource is in use.
660         "500":
661           description: Internal Server Error
662           content:
663             application/json:
664               schema:
665                 $ref: '#/components/schemas/ErrorMessage'
666               example:
667                 status: 500
668                 message: Internal Server Error
669                 details: Internal Server Error occurred
670   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
671     get:
672       tags:
673       - cps-data
674       summary: Get a node
675       description: Get a node with an option to retrieve all the children for a given
676         anchor and dataspace
677       operationId: getNodeByDataspaceAndAnchor
678       parameters:
679       - name: dataspace-name
680         in: path
681         description: dataspace-name
682         required: true
683         schema:
684           type: string
685           example: my-dataspace
686       - name: anchor-name
687         in: path
688         description: anchor-name
689         required: true
690         schema:
691           type: string
692           example: my-anchor
693       - name: xpath
694         in: query
695         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
696         required: false
697         schema:
698           type: string
699           default: /
700         examples:
701           container xpath:
702             value: /shops/bookstore
703           list attributes xpath:
704             value: "/shops/bookstore/categories[@code=1]"
705       - name: include-descendants
706         in: query
707         description: include-descendants
708         required: false
709         schema:
710           type: boolean
711           example: false
712           default: false
713       responses:
714         "200":
715           description: OK
716           content:
717             application/json:
718               schema:
719                 type: object
720               examples:
721                 dataSample:
722                   $ref: '#/components/examples/dataSample'
723         "400":
724           description: Bad Request
725           content:
726             application/json:
727               schema:
728                 $ref: '#/components/schemas/ErrorMessage'
729               example:
730                 status: 400
731                 message: Bad Request
732                 details: The provided request is not valid
733         "401":
734           description: Unauthorized
735           content:
736             application/json:
737               schema:
738                 $ref: '#/components/schemas/ErrorMessage'
739               example:
740                 status: 401
741                 message: Unauthorized request
742                 details: This request is unauthorized
743         "403":
744           description: Forbidden
745           content:
746             application/json:
747               schema:
748                 $ref: '#/components/schemas/ErrorMessage'
749               example:
750                 status: 403
751                 message: Request Forbidden
752                 details: This request is forbidden
753         "500":
754           description: Internal Server Error
755           content:
756             application/json:
757               schema:
758                 $ref: '#/components/schemas/ErrorMessage'
759               example:
760                 status: 500
761                 message: Internal Server Error
762                 details: Internal Server Error occurred
763       x-codegen-request-body-name: xpath
764   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
765     put:
766       tags:
767       - cps-data
768       summary: Replace a node with descendants
769       description: "Replace a node with descendants for a given dataspace, anchor\
770         \ and a parent node xpath"
771       operationId: replaceNode
772       parameters:
773       - name: dataspace-name
774         in: path
775         description: dataspace-name
776         required: true
777         schema:
778           type: string
779           example: my-dataspace
780       - name: anchor-name
781         in: path
782         description: anchor-name
783         required: true
784         schema:
785           type: string
786           example: my-anchor
787       - name: xpath
788         in: query
789         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
790         required: false
791         schema:
792           type: string
793           default: /
794         examples:
795           container xpath:
796             value: /shops/bookstore
797           list attributes xpath:
798             value: "/shops/bookstore/categories[@code=1]"
799       - name: observed-timestamp
800         in: query
801         description: observed-timestamp
802         required: false
803         schema:
804           type: string
805           example: 2021-03-21T00:10:34.030-0100
806       requestBody:
807         content:
808           application/json:
809             schema:
810               type: object
811             examples:
812               dataSample:
813                 $ref: '#/components/examples/dataSample'
814         required: true
815       responses:
816         "200":
817           description: OK
818           content:
819             application/json:
820               schema:
821                 type: object
822               examples:
823                 dataSample:
824                   value: ""
825         "400":
826           description: Bad Request
827           content:
828             application/json:
829               schema:
830                 $ref: '#/components/schemas/ErrorMessage'
831               example:
832                 status: 400
833                 message: Bad Request
834                 details: The provided request is not valid
835         "401":
836           description: Unauthorized
837           content:
838             application/json:
839               schema:
840                 $ref: '#/components/schemas/ErrorMessage'
841               example:
842                 status: 401
843                 message: Unauthorized request
844                 details: This request is unauthorized
845         "403":
846           description: Forbidden
847           content:
848             application/json:
849               schema:
850                 $ref: '#/components/schemas/ErrorMessage'
851               example:
852                 status: 403
853                 message: Request Forbidden
854                 details: This request is forbidden
855         "500":
856           description: Internal Server Error
857           content:
858             application/json:
859               schema:
860                 $ref: '#/components/schemas/ErrorMessage'
861               example:
862                 status: 500
863                 message: Internal Server Error
864                 details: Internal Server Error occurred
865     post:
866       tags:
867       - cps-data
868       summary: Create a node
869       description: Create a node for a given anchor and dataspace
870       operationId: createNode
871       parameters:
872       - name: dataspace-name
873         in: path
874         description: dataspace-name
875         required: true
876         schema:
877           type: string
878           example: my-dataspace
879       - name: anchor-name
880         in: path
881         description: anchor-name
882         required: true
883         schema:
884           type: string
885           example: my-anchor
886       - name: xpath
887         in: query
888         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
889         required: false
890         schema:
891           type: string
892           default: /
893         examples:
894           container xpath:
895             value: /shops/bookstore
896           list attributes xpath:
897             value: "/shops/bookstore/categories[@code=1]"
898       - name: observed-timestamp
899         in: query
900         description: observed-timestamp
901         required: false
902         schema:
903           type: string
904           example: 2021-03-21T00:10:34.030-0100
905       requestBody:
906         content:
907           application/json:
908             schema:
909               type: object
910             examples:
911               dataSample:
912                 $ref: '#/components/examples/dataSample'
913         required: true
914       responses:
915         "201":
916           description: Created
917           content:
918             text/plain:
919               schema:
920                 type: string
921                 example: my-resource
922         "400":
923           description: Bad Request
924           content:
925             application/json:
926               schema:
927                 $ref: '#/components/schemas/ErrorMessage'
928               example:
929                 status: 400
930                 message: Bad Request
931                 details: The provided request is not valid
932         "401":
933           description: Unauthorized
934           content:
935             application/json:
936               schema:
937                 $ref: '#/components/schemas/ErrorMessage'
938               example:
939                 status: 401
940                 message: Unauthorized request
941                 details: This request is unauthorized
942         "403":
943           description: Forbidden
944           content:
945             application/json:
946               schema:
947                 $ref: '#/components/schemas/ErrorMessage'
948               example:
949                 status: 403
950                 message: Request Forbidden
951                 details: This request is forbidden
952         "409":
953           description: Conflict
954           content:
955             application/json:
956               schema:
957                 $ref: '#/components/schemas/ErrorMessage'
958               example:
959                 status: 409
960                 message: Conflicting request
961                 details: The request cannot be processed as the resource is in use.
962         "500":
963           description: Internal Server Error
964           content:
965             application/json:
966               schema:
967                 $ref: '#/components/schemas/ErrorMessage'
968               example:
969                 status: 500
970                 message: Internal Server Error
971                 details: Internal Server Error occurred
972     delete:
973       tags:
974       - cps-data
975       summary: Delete a data node
976       description: Delete a datanode for a given dataspace and anchor given a node
977         xpath.
978       operationId: deleteDataNode
979       parameters:
980       - name: dataspace-name
981         in: path
982         description: dataspace-name
983         required: true
984         schema:
985           type: string
986           example: my-dataspace
987       - name: anchor-name
988         in: path
989         description: anchor-name
990         required: true
991         schema:
992           type: string
993           example: my-anchor
994       - name: xpath
995         in: query
996         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
997         required: false
998         schema:
999           type: string
1000           default: /
1001         examples:
1002           container xpath:
1003             value: /shops/bookstore
1004           list attributes xpath:
1005             value: "/shops/bookstore/categories[@code=1]"
1006       - name: observed-timestamp
1007         in: query
1008         description: observed-timestamp
1009         required: false
1010         schema:
1011           type: string
1012           example: 2021-03-21T00:10:34.030-0100
1013       responses:
1014         "204":
1015           description: No Content
1016           content: {}
1017         "400":
1018           description: Bad Request
1019           content:
1020             application/json:
1021               schema:
1022                 $ref: '#/components/schemas/ErrorMessage'
1023               example:
1024                 status: 400
1025                 message: Bad Request
1026                 details: The provided request is not valid
1027         "401":
1028           description: Unauthorized
1029           content:
1030             application/json:
1031               schema:
1032                 $ref: '#/components/schemas/ErrorMessage'
1033               example:
1034                 status: 401
1035                 message: Unauthorized request
1036                 details: This request is unauthorized
1037         "403":
1038           description: Forbidden
1039           content:
1040             application/json:
1041               schema:
1042                 $ref: '#/components/schemas/ErrorMessage'
1043               example:
1044                 status: 403
1045                 message: Request Forbidden
1046                 details: This request is forbidden
1047         "500":
1048           description: Internal Server Error
1049           content:
1050             application/json:
1051               schema:
1052                 $ref: '#/components/schemas/ErrorMessage'
1053               example:
1054                 status: 500
1055                 message: Internal Server Error
1056                 details: Internal Server Error occurred
1057     patch:
1058       tags:
1059       - cps-data
1060       summary: Update node leaves
1061       description: Update a data node leaves for a given dataspace and anchor and
1062         a parent node xpath
1063       operationId: updateNodeLeaves
1064       parameters:
1065       - name: dataspace-name
1066         in: path
1067         description: dataspace-name
1068         required: true
1069         schema:
1070           type: string
1071           example: my-dataspace
1072       - name: anchor-name
1073         in: path
1074         description: anchor-name
1075         required: true
1076         schema:
1077           type: string
1078           example: my-anchor
1079       - name: xpath
1080         in: query
1081         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1082         required: false
1083         schema:
1084           type: string
1085           default: /
1086         examples:
1087           container xpath:
1088             value: /shops/bookstore
1089           list attributes xpath:
1090             value: "/shops/bookstore/categories[@code=1]"
1091       - name: observed-timestamp
1092         in: query
1093         description: observed-timestamp
1094         required: false
1095         schema:
1096           type: string
1097           example: 2021-03-21T00:10:34.030-0100
1098       requestBody:
1099         content:
1100           application/json:
1101             schema:
1102               type: object
1103             examples:
1104               dataSample:
1105                 $ref: '#/components/examples/dataSample'
1106         required: true
1107       responses:
1108         "200":
1109           description: OK
1110           content:
1111             application/json:
1112               schema:
1113                 type: object
1114               examples:
1115                 dataSample:
1116                   value: ""
1117         "400":
1118           description: Bad Request
1119           content:
1120             application/json:
1121               schema:
1122                 $ref: '#/components/schemas/ErrorMessage'
1123               example:
1124                 status: 400
1125                 message: Bad Request
1126                 details: The provided request is not valid
1127         "401":
1128           description: Unauthorized
1129           content:
1130             application/json:
1131               schema:
1132                 $ref: '#/components/schemas/ErrorMessage'
1133               example:
1134                 status: 401
1135                 message: Unauthorized request
1136                 details: This request is unauthorized
1137         "403":
1138           description: Forbidden
1139           content:
1140             application/json:
1141               schema:
1142                 $ref: '#/components/schemas/ErrorMessage'
1143               example:
1144                 status: 403
1145                 message: Request Forbidden
1146                 details: This request is forbidden
1147         "500":
1148           description: Internal Server Error
1149           content:
1150             application/json:
1151               schema:
1152                 $ref: '#/components/schemas/ErrorMessage'
1153               example:
1154                 status: 500
1155                 message: Internal Server Error
1156                 details: Internal Server Error occurred
1157   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1158     put:
1159       tags:
1160       - cps-data
1161       summary: Replace list content
1162       description: "Replace list content under a given parent, anchor and dataspace"
1163       operationId: replaceListContent
1164       parameters:
1165       - name: dataspace-name
1166         in: path
1167         description: dataspace-name
1168         required: true
1169         schema:
1170           type: string
1171           example: my-dataspace
1172       - name: anchor-name
1173         in: path
1174         description: anchor-name
1175         required: true
1176         schema:
1177           type: string
1178           example: my-anchor
1179       - name: xpath
1180         in: query
1181         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1182         required: true
1183         schema:
1184           type: string
1185         examples:
1186           container xpath:
1187             value: /shops/bookstore
1188           list attributes xpath:
1189             value: "/shops/bookstore/categories[@code=1]"
1190       - name: observed-timestamp
1191         in: query
1192         description: observed-timestamp
1193         required: false
1194         schema:
1195           type: string
1196           example: 2021-03-21T00:10:34.030-0100
1197       requestBody:
1198         content:
1199           application/json:
1200             schema:
1201               type: object
1202             examples:
1203               dataSample:
1204                 $ref: '#/components/examples/dataSample'
1205         required: true
1206       responses:
1207         "200":
1208           description: OK
1209           content:
1210             application/json:
1211               schema:
1212                 type: object
1213               examples:
1214                 dataSample:
1215                   value: ""
1216         "400":
1217           description: Bad Request
1218           content:
1219             application/json:
1220               schema:
1221                 $ref: '#/components/schemas/ErrorMessage'
1222               example:
1223                 status: 400
1224                 message: Bad Request
1225                 details: The provided request is not valid
1226         "401":
1227           description: Unauthorized
1228           content:
1229             application/json:
1230               schema:
1231                 $ref: '#/components/schemas/ErrorMessage'
1232               example:
1233                 status: 401
1234                 message: Unauthorized request
1235                 details: This request is unauthorized
1236         "403":
1237           description: Forbidden
1238           content:
1239             application/json:
1240               schema:
1241                 $ref: '#/components/schemas/ErrorMessage'
1242               example:
1243                 status: 403
1244                 message: Request Forbidden
1245                 details: This request is forbidden
1246         "500":
1247           description: Internal Server Error
1248           content:
1249             application/json:
1250               schema:
1251                 $ref: '#/components/schemas/ErrorMessage'
1252               example:
1253                 status: 500
1254                 message: Internal Server Error
1255                 details: Internal Server Error occurred
1256     post:
1257       tags:
1258       - cps-data
1259       summary: Add list element(s)
1260       description: Add list element(s) to a list for a given anchor and dataspace
1261       operationId: addListElements
1262       parameters:
1263       - name: dataspace-name
1264         in: path
1265         description: dataspace-name
1266         required: true
1267         schema:
1268           type: string
1269           example: my-dataspace
1270       - name: anchor-name
1271         in: path
1272         description: anchor-name
1273         required: true
1274         schema:
1275           type: string
1276           example: my-anchor
1277       - name: xpath
1278         in: query
1279         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1280         required: true
1281         schema:
1282           type: string
1283         examples:
1284           container xpath:
1285             value: /shops/bookstore
1286           list attributes xpath:
1287             value: "/shops/bookstore/categories[@code=1]"
1288       - name: observed-timestamp
1289         in: query
1290         description: observed-timestamp
1291         required: false
1292         schema:
1293           type: string
1294           example: 2021-03-21T00:10:34.030-0100
1295       requestBody:
1296         content:
1297           application/json:
1298             schema:
1299               type: object
1300             examples:
1301               dataSample:
1302                 $ref: '#/components/examples/dataSample'
1303         required: true
1304       responses:
1305         "201":
1306           description: Created
1307           content:
1308             text/plain:
1309               schema:
1310                 type: string
1311                 example: my-resource
1312         "400":
1313           description: Bad Request
1314           content:
1315             application/json:
1316               schema:
1317                 $ref: '#/components/schemas/ErrorMessage'
1318               example:
1319                 status: 400
1320                 message: Bad Request
1321                 details: The provided request is not valid
1322         "401":
1323           description: Unauthorized
1324           content:
1325             application/json:
1326               schema:
1327                 $ref: '#/components/schemas/ErrorMessage'
1328               example:
1329                 status: 401
1330                 message: Unauthorized request
1331                 details: This request is unauthorized
1332         "403":
1333           description: Forbidden
1334           content:
1335             application/json:
1336               schema:
1337                 $ref: '#/components/schemas/ErrorMessage'
1338               example:
1339                 status: 403
1340                 message: Request Forbidden
1341                 details: This request is forbidden
1342         "500":
1343           description: Internal Server Error
1344           content:
1345             application/json:
1346               schema:
1347                 $ref: '#/components/schemas/ErrorMessage'
1348               example:
1349                 status: 500
1350                 message: Internal Server Error
1351                 details: Internal Server Error occurred
1352     delete:
1353       tags:
1354       - cps-data
1355       summary: Delete one or all list element(s)
1356       description: Delete one or all list element(s) for a given anchor and dataspace
1357       operationId: deleteListOrListElement
1358       parameters:
1359       - name: dataspace-name
1360         in: path
1361         description: dataspace-name
1362         required: true
1363         schema:
1364           type: string
1365           example: my-dataspace
1366       - name: anchor-name
1367         in: path
1368         description: anchor-name
1369         required: true
1370         schema:
1371           type: string
1372           example: my-anchor
1373       - name: xpath
1374         in: query
1375         description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1376         required: true
1377         schema:
1378           type: string
1379         examples:
1380           container xpath:
1381             value: /shops/bookstore
1382           list attributes xpath:
1383             value: "/shops/bookstore/categories[@code=1]"
1384       - name: observed-timestamp
1385         in: query
1386         description: observed-timestamp
1387         required: false
1388         schema:
1389           type: string
1390           example: 2021-03-21T00:10:34.030-0100
1391       responses:
1392         "204":
1393           description: No Content
1394           content: {}
1395         "400":
1396           description: Bad Request
1397           content:
1398             application/json:
1399               schema:
1400                 $ref: '#/components/schemas/ErrorMessage'
1401               example:
1402                 status: 400
1403                 message: Bad Request
1404                 details: The provided request is not valid
1405         "401":
1406           description: Unauthorized
1407           content:
1408             application/json:
1409               schema:
1410                 $ref: '#/components/schemas/ErrorMessage'
1411               example:
1412                 status: 401
1413                 message: Unauthorized request
1414                 details: This request is unauthorized
1415         "403":
1416           description: Forbidden
1417           content:
1418             application/json:
1419               schema:
1420                 $ref: '#/components/schemas/ErrorMessage'
1421               example:
1422                 status: 403
1423                 message: Request Forbidden
1424                 details: This request is forbidden
1425         "500":
1426           description: Internal Server Error
1427           content:
1428             application/json:
1429               schema:
1430                 $ref: '#/components/schemas/ErrorMessage'
1431               example:
1432                 status: 500
1433                 message: Internal Server Error
1434                 details: Internal Server Error occurred
1435       deprecated: true
1436   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
1437     get:
1438       tags:
1439       - cps-query
1440       summary: Query data nodes
1441       description: Query data nodes for the given dataspace and anchor using CPS path
1442       operationId: getNodesByDataspaceAndAnchorAndCpsPath
1443       parameters:
1444       - name: dataspace-name
1445         in: path
1446         description: dataspace-name
1447         required: true
1448         schema:
1449           type: string
1450           example: my-dataspace
1451       - name: anchor-name
1452         in: path
1453         description: anchor-name
1454         required: true
1455         schema:
1456           type: string
1457           example: my-anchor
1458       - name: cps-path
1459         in: query
1460         description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
1461         required: false
1462         schema:
1463           type: string
1464           default: /
1465         examples:
1466           container cps path:
1467             value: //bookstore
1468           list attributes cps path:
1469             value: "//categories[@code=1]"
1470       - name: include-descendants
1471         in: query
1472         description: include-descendants
1473         required: false
1474         schema:
1475           type: boolean
1476           example: false
1477           default: false
1478       responses:
1479         "200":
1480           description: OK
1481           content:
1482             application/json:
1483               schema:
1484                 type: object
1485               examples:
1486                 dataSample:
1487                   $ref: '#/components/examples/dataSample'
1488         "400":
1489           description: Bad Request
1490           content:
1491             application/json:
1492               schema:
1493                 $ref: '#/components/schemas/ErrorMessage'
1494               example:
1495                 status: 400
1496                 message: Bad Request
1497                 details: The provided request is not valid
1498         "401":
1499           description: Unauthorized
1500           content:
1501             application/json:
1502               schema:
1503                 $ref: '#/components/schemas/ErrorMessage'
1504               example:
1505                 status: 401
1506                 message: Unauthorized request
1507                 details: This request is unauthorized
1508         "403":
1509           description: Forbidden
1510           content:
1511             application/json:
1512               schema:
1513                 $ref: '#/components/schemas/ErrorMessage'
1514               example:
1515                 status: 403
1516                 message: Request Forbidden
1517                 details: This request is forbidden
1518         "500":
1519           description: Internal Server Error
1520           content:
1521             application/json:
1522               schema:
1523                 $ref: '#/components/schemas/ErrorMessage'
1524               example:
1525                 status: 500
1526                 message: Internal Server Error
1527                 details: Internal Server Error occurred
1528       x-codegen-request-body-name: xpath
1529 components:
1530   schemas:
1531     ErrorMessage:
1532       title: Error
1533       type: object
1534       properties:
1535         status:
1536           type: string
1537         message:
1538           type: string
1539         details:
1540           type: string
1541     AnchorDetails:
1542       title: Anchor details by anchor Name
1543       type: object
1544       properties:
1545         name:
1546           type: string
1547           example: my-anchor
1548         dataspaceName:
1549           type: string
1550           example: my-dataspace
1551         schemaSetName:
1552           type: string
1553           example: my-schema-set
1554     MultipartFile:
1555       required:
1556       - file
1557       type: object
1558       properties:
1559         file:
1560           type: string
1561           description: multipartFile
1562           format: binary
1563     SchemaSetDetails:
1564       title: Schema set details by dataspace and schemasetName
1565       required:
1566       - moduleReferences
1567       type: object
1568       properties:
1569         dataspaceName:
1570           type: string
1571           example: my-dataspace
1572         moduleReferences:
1573           type: array
1574           items:
1575             $ref: '#/components/schemas/ModuleReferences'
1576         name:
1577           type: string
1578           example: my-schema-set
1579     ModuleReferences:
1580       title: Module reference object
1581       type: object
1582       properties:
1583         name:
1584           type: string
1585           example: my-module-reference-name
1586         namespace:
1587           type: string
1588           example: my-module-reference-namespace
1589         revision:
1590           type: string
1591           example: my-module-reference-revision
1592   examples:
1593     dataSample:
1594       value:
1595         test:bookstore:
1596           bookstore-name: Chapters
1597           categories:
1598           - code: 1
1599             name: SciFi
1600           - code: 2
1601             name: kids