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