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
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # SPDX-License-Identifier: Apache-2.0
16 # ============LICENSE_END=========================================================
20 title: ONAP Open API v3 Configuration Persistence Service
21 description: Configuration Persistence Service is a Model Driven Generic Database
25 url: 'https://onap.readthedocs.io'
26 email: onap-discuss@lists.onap.org
29 url: 'http://www.apache.org/licenses/LICENSE-2.0'
30 x-planned-retirement-date: '202212'
35 - url: '//localhost:8088'
38 description: cps Admin
44 description: Create a new dataspace
47 summary: Create a dataspace
48 operationId: createDataspace
50 - name: dataspace-name
52 description: dataspace-name
64 description: Bad Request
68 $ref: '#/components/schemas/ErrorMessage'
70 description: Unauthorized
74 $ref: '#/components/schemas/ErrorMessage'
76 description: Forbidden
80 $ref: '#/components/schemas/ErrorMessage'
81 '/v1/dataspaces/{dataspace-name}':
83 description: Delete the given dataspace - DRAFT
86 summary: Delete a dataspace
87 operationId: deleteDataspace
89 - name: dataspace-name
91 description: dataspace-name
103 description: No Content
106 description: Bad Request
110 $ref: '#/components/schemas/ErrorMessage'
112 description: Unauthorized
116 $ref: '#/components/schemas/ErrorMessage'
118 description: Forbidden
122 $ref: '#/components/schemas/ErrorMessage'
123 '/v1/dataspaces/{dataspace-name}/anchors':
125 description: 'Read all anchors, given a dataspace'
129 operationId: getAnchors
131 - name: dataspace-name
133 description: dataspace-name
145 description: Bad Request
149 $ref: '#/components/schemas/ErrorMessage'
151 description: Unauthorized
155 $ref: '#/components/schemas/ErrorMessage'
157 description: Forbidden
161 $ref: '#/components/schemas/ErrorMessage'
163 description: The specified resource was not found
167 $ref: '#/components/schemas/ErrorMessage'
169 description: Create a new anchor in the given dataspace
172 summary: Create an anchor
173 operationId: createAnchor
175 - name: dataspace-name
177 description: dataspace-name
181 - name: schema-set-name
183 description: schema-set-name
189 description: anchor-name
201 description: Bad Request
205 $ref: '#/components/schemas/ErrorMessage'
207 description: Unauthorized
211 $ref: '#/components/schemas/ErrorMessage'
213 description: Forbidden
217 $ref: '#/components/schemas/ErrorMessage'
218 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}':
220 description: Read an anchor given an anchor name and a dataspace
223 summary: Get an anchor
224 operationId: getAnchor
226 - name: dataspace-name
228 description: dataspace-name
234 description: anchor-name
246 description: Bad Request
250 $ref: '#/components/schemas/ErrorMessage'
252 description: Unauthorized
256 $ref: '#/components/schemas/ErrorMessage'
258 description: Forbidden
262 $ref: '#/components/schemas/ErrorMessage'
264 description: The specified resource was not found
268 $ref: '#/components/schemas/ErrorMessage'
270 description: Delete an anchor given an anchor name and a dataspace - DRAFT
273 summary: Delete an anchor
274 operationId: deleteAnchor
276 - name: dataspace-name
278 description: dataspace-name
284 description: anchor-name
296 description: No Content
299 description: Bad Request
303 $ref: '#/components/schemas/ErrorMessage'
305 description: Unauthorized
309 $ref: '#/components/schemas/ErrorMessage'
311 description: Forbidden
315 $ref: '#/components/schemas/ErrorMessage'
316 '/v1/dataspaces/{dataspace-name}/schema-sets':
318 description: Create a new schema set in the given dataspace
321 summary: Create a schema set
322 operationId: createSchemaSet
324 - name: dataspace-name
326 description: dataspace-name
330 - name: schema-set-name
332 description: schema-set-name
346 description: multipartFile
348 example: 'http://example.com/examples/example.yang'
357 description: Bad Request
361 $ref: '#/components/schemas/ErrorMessage'
363 description: Unauthorized
367 $ref: '#/components/schemas/ErrorMessage'
369 description: Forbidden
373 $ref: '#/components/schemas/ErrorMessage'
374 '/v1/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}':
376 description: Read a schema set given a schema set name and a dataspace
379 summary: Get a schema set
380 operationId: getSchemaSet
382 - name: dataspace-name
384 description: dataspace-name
388 - name: schema-set-name
390 description: schema-set-name
402 description: Bad Request
406 $ref: '#/components/schemas/ErrorMessage'
408 description: Unauthorized
412 $ref: '#/components/schemas/ErrorMessage'
414 description: Forbidden
418 $ref: '#/components/schemas/ErrorMessage'
420 description: The specified resource was not found
424 $ref: '#/components/schemas/ErrorMessage'
426 description: Delete a schema set given a schema set name and a dataspace
429 summary: Delete a schema set
430 operationId: deleteSchemaSet
432 - name: dataspace-name
434 description: dataspace-name
438 - name: schema-set-name
440 description: schema-set-name
446 description: No Content
449 description: Bad Request
453 $ref: '#/components/schemas/ErrorMessage'
455 description: Unauthorized
459 $ref: '#/components/schemas/ErrorMessage'
461 description: Forbidden
465 $ref: '#/components/schemas/ErrorMessage'
467 description: Conflict
471 $ref: '#/components/schemas/ErrorMessage'
472 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node':
475 Get a node with an option to retrieve all the children for a given
480 operationId: getNodeByDataspaceAndAnchor
482 - name: dataspace-name
484 description: dataspace-name
490 description: anchor-name
501 - name: include-descendants
503 description: include-descendants
516 description: Bad Request
520 $ref: '#/components/schemas/ErrorMessage'
522 description: Unauthorized
526 $ref: '#/components/schemas/ErrorMessage'
528 description: Forbidden
532 $ref: '#/components/schemas/ErrorMessage'
534 description: The specified resource was not found
538 $ref: '#/components/schemas/ErrorMessage'
539 x-codegen-request-body-name: xpath
540 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes':
542 description: Create a node for a given anchor and dataspace
545 summary: Create a node
546 operationId: createNode
548 - name: dataspace-name
550 description: dataspace-name
556 description: anchor-name
574 description: Bad Request
578 $ref: '#/components/schemas/ErrorMessage'
580 description: Unauthorized
584 $ref: '#/components/schemas/ErrorMessage'
586 description: Forbidden
590 $ref: '#/components/schemas/ErrorMessage'
593 Update a data node leaves for a given dataspace and anchor and a parent
597 summary: Update node leaves
598 operationId: updateNodeLeaves
600 - name: dataspace-name
602 description: dataspace-name
608 description: anchor-name
633 description: Bad Request
637 $ref: '#/components/schemas/ErrorMessage'
639 description: Unauthorized
643 $ref: '#/components/schemas/ErrorMessage'
645 description: Forbidden
649 $ref: '#/components/schemas/ErrorMessage'
652 Replace a node with descendants for a given dataspace, anchor and a
656 summary: Replace a node with descendants
657 operationId: replaceNode
659 - name: dataspace-name
661 description: dataspace-name
667 description: anchor-name
692 description: Bad Request
696 $ref: '#/components/schemas/ErrorMessage'
698 description: Unauthorized
702 $ref: '#/components/schemas/ErrorMessage'
704 description: Forbidden
708 $ref: '#/components/schemas/ErrorMessage'
709 '/v1/dataspaces/{dataspace-name}/nodes':
712 Get all nodes for a given dataspace using an xpath or schema node
717 operationId: getNodesByDataspace
719 - name: dataspace-name
721 description: dataspace-name
733 description: Bad Request
737 $ref: '#/components/schemas/ErrorMessage'
739 description: Unauthorized
743 $ref: '#/components/schemas/ErrorMessage'
745 description: Forbidden
749 $ref: '#/components/schemas/ErrorMessage'
751 description: The specified resource was not found
755 $ref: '#/components/schemas/ErrorMessage'
756 x-codegen-request-body-name: requestBody
757 '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query':
759 description: Query data nodes for the given dataspace and anchor using CPS path
762 summary: Query data nodes
763 operationId: getNodesByDataspaceAndAnchorAndCpsPath
765 - name: dataspace-name
767 description: dataspace-name
773 description: anchor-name
779 description: cps-path
784 - name: include-descendants
786 description: include-descendants
799 description: Bad Request
803 $ref: '#/components/schemas/ErrorMessage'
805 description: Unauthorized
809 $ref: '#/components/schemas/ErrorMessage'
811 description: Forbidden
815 $ref: '#/components/schemas/ErrorMessage'
817 description: The specified resource was not found
821 $ref: '#/components/schemas/ErrorMessage'
822 x-codegen-request-body-name: xpath
834 example: Dataspace not found
837 example: Dataspace with name D1 does not exist.