1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021 Nordix Foundation
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
21 title: ONAP Open API v3 Configuration Persistence Service
22 description: Configuration Persistence Service is a Model Driven Generic Database
26 url: 'https://onap.readthedocs.io'
27 email: onap-discuss@lists.onap.org
30 url: 'http://www.apache.org/licenses/LICENSE-2.0'
31 x-planned-retirement-date: '202212'
36 - url: '//localhost:8088'
39 description: cps Admin
45 description: Create a new dataspace
48 summary: Create a dataspace
49 operationId: createDataspace
51 - name: dataspace-name
53 description: dataspace-name
65 description: Bad Request
69 $ref: '#/components/schemas/ErrorMessage'
71 description: Unauthorized
75 $ref: '#/components/schemas/ErrorMessage'
77 description: Forbidden
81 $ref: '#/components/schemas/ErrorMessage'
82 '/v1/dataspaces/{dataspace-name}':
84 description: Delete the given dataspace - DRAFT
87 summary: Delete a dataspace
88 operationId: deleteDataspace
90 - name: dataspace-name
92 description: dataspace-name
104 description: No Content
107 description: Bad Request
111 $ref: '#/components/schemas/ErrorMessage'
113 description: Unauthorized
117 $ref: '#/components/schemas/ErrorMessage'
119 description: Forbidden
123 $ref: '#/components/schemas/ErrorMessage'
124 '/v1/dataspaces/{dataspace-name}/anchors':
126 description: 'Read all anchors, given a dataspace'
130 operationId: getAnchors
132 - name: dataspace-name
134 description: dataspace-name
146 description: Bad Request
150 $ref: '#/components/schemas/ErrorMessage'
152 description: Unauthorized
156 $ref: '#/components/schemas/ErrorMessage'
158 description: Forbidden
162 $ref: '#/components/schemas/ErrorMessage'
164 description: The specified resource was not found
168 $ref: '#/components/schemas/ErrorMessage'
170 description: Create a new anchor in the given dataspace
173 summary: Create an anchor
174 operationId: createAnchor
176 - name: dataspace-name
178 description: dataspace-name
182 - name: schema-set-name
184 description: schema-set-name
190 description: anchor-name
202 description: Bad Request
206 $ref: '#/components/schemas/ErrorMessage'
208 description: Unauthorized
212 $ref: '#/components/schemas/ErrorMessage'
214 description: Forbidden
218 $ref: '#/components/schemas/ErrorMessage'
219 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}':
221 description: Read an anchor given an anchor name and a dataspace
224 summary: Get an anchor
225 operationId: getAnchor
227 - name: dataspace-name
229 description: dataspace-name
235 description: anchor-name
247 description: Bad Request
251 $ref: '#/components/schemas/ErrorMessage'
253 description: Unauthorized
257 $ref: '#/components/schemas/ErrorMessage'
259 description: Forbidden
263 $ref: '#/components/schemas/ErrorMessage'
265 description: The specified resource was not found
269 $ref: '#/components/schemas/ErrorMessage'
271 description: Delete an anchor given an anchor name and a dataspace - DRAFT
274 summary: Delete an anchor
275 operationId: deleteAnchor
277 - name: dataspace-name
279 description: dataspace-name
285 description: anchor-name
297 description: No Content
300 description: Bad Request
304 $ref: '#/components/schemas/ErrorMessage'
306 description: Unauthorized
310 $ref: '#/components/schemas/ErrorMessage'
312 description: Forbidden
316 $ref: '#/components/schemas/ErrorMessage'
317 '/v1/dataspaces/{dataspace-name}/schema-sets':
319 description: Create a new schema set in the given dataspace
322 summary: Create a schema set
323 operationId: createSchemaSet
325 - name: dataspace-name
327 description: dataspace-name
331 - name: schema-set-name
333 description: schema-set-name
347 description: multipartFile
349 example: 'http://example.com/examples/example.yang'
358 description: Bad Request
362 $ref: '#/components/schemas/ErrorMessage'
364 description: Unauthorized
368 $ref: '#/components/schemas/ErrorMessage'
370 description: Forbidden
374 $ref: '#/components/schemas/ErrorMessage'
375 '/v1/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}':
377 description: Read a schema set given a schema set name and a dataspace
380 summary: Get a schema set
381 operationId: getSchemaSet
383 - name: dataspace-name
385 description: dataspace-name
389 - name: schema-set-name
391 description: schema-set-name
403 description: Bad Request
407 $ref: '#/components/schemas/ErrorMessage'
409 description: Unauthorized
413 $ref: '#/components/schemas/ErrorMessage'
415 description: Forbidden
419 $ref: '#/components/schemas/ErrorMessage'
421 description: The specified resource was not found
425 $ref: '#/components/schemas/ErrorMessage'
427 description: Delete a schema set given a schema set name and a dataspace
430 summary: Delete a schema set
431 operationId: deleteSchemaSet
433 - name: dataspace-name
435 description: dataspace-name
439 - name: schema-set-name
441 description: schema-set-name
447 description: No Content
450 description: Bad Request
454 $ref: '#/components/schemas/ErrorMessage'
456 description: Unauthorized
460 $ref: '#/components/schemas/ErrorMessage'
462 description: Forbidden
466 $ref: '#/components/schemas/ErrorMessage'
468 description: Conflict
472 $ref: '#/components/schemas/ErrorMessage'
473 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node':
476 Get a node with an option to retrieve all the children for a given
481 operationId: getNodeByDataspaceAndAnchor
483 - name: dataspace-name
485 description: dataspace-name
491 description: anchor-name
502 - name: include-descendants
504 description: include-descendants
517 description: Bad Request
521 $ref: '#/components/schemas/ErrorMessage'
523 description: Unauthorized
527 $ref: '#/components/schemas/ErrorMessage'
529 description: Forbidden
533 $ref: '#/components/schemas/ErrorMessage'
535 description: The specified resource was not found
539 $ref: '#/components/schemas/ErrorMessage'
540 x-codegen-request-body-name: xpath
541 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes':
543 description: Create a node for a given anchor and dataspace
546 summary: Create a node
547 operationId: createNode
549 - name: dataspace-name
551 description: dataspace-name
557 description: anchor-name
575 description: Bad Request
579 $ref: '#/components/schemas/ErrorMessage'
581 description: Unauthorized
585 $ref: '#/components/schemas/ErrorMessage'
587 description: Forbidden
591 $ref: '#/components/schemas/ErrorMessage'
594 Update a data node leaves for a given dataspace and anchor and a parent
598 summary: Update node leaves
599 operationId: updateNodeLeaves
601 - name: dataspace-name
603 description: dataspace-name
609 description: anchor-name
634 description: Bad Request
638 $ref: '#/components/schemas/ErrorMessage'
640 description: Unauthorized
644 $ref: '#/components/schemas/ErrorMessage'
646 description: Forbidden
650 $ref: '#/components/schemas/ErrorMessage'
653 Replace a node with descendants for a given dataspace, anchor and a
657 summary: Replace a node with descendants
658 operationId: replaceNode
660 - name: dataspace-name
662 description: dataspace-name
668 description: anchor-name
693 description: Bad Request
697 $ref: '#/components/schemas/ErrorMessage'
699 description: Unauthorized
703 $ref: '#/components/schemas/ErrorMessage'
705 description: Forbidden
709 $ref: '#/components/schemas/ErrorMessage'
710 '/v1/dataspaces/{dataspace-name}/nodes':
713 Get all nodes for a given dataspace using an xpath or schema node
718 operationId: getNodesByDataspace
720 - name: dataspace-name
722 description: dataspace-name
734 description: Bad Request
738 $ref: '#/components/schemas/ErrorMessage'
740 description: Unauthorized
744 $ref: '#/components/schemas/ErrorMessage'
746 description: Forbidden
750 $ref: '#/components/schemas/ErrorMessage'
752 description: The specified resource was not found
756 $ref: '#/components/schemas/ErrorMessage'
757 x-codegen-request-body-name: requestBody
758 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query':
760 description: Query data nodes for the given dataspace and anchor using CPS path
763 summary: Query data nodes
764 operationId: getNodesByDataspaceAndAnchorAndCpsPath
766 - name: dataspace-name
768 description: dataspace-name
774 description: anchor-name
780 description: cps-path
785 - name: include-descendants
787 description: include-descendants
800 description: Bad Request
804 $ref: '#/components/schemas/ErrorMessage'
806 description: Unauthorized
810 $ref: '#/components/schemas/ErrorMessage'
812 description: Forbidden
816 $ref: '#/components/schemas/ErrorMessage'
818 description: The specified resource was not found
822 $ref: '#/components/schemas/ErrorMessage'
823 x-codegen-request-body-name: xpath
835 example: Dataspace not found
838 example: Dataspace with name D1 does not exist.