openapi: 3.0.1
info:
- title: CPS API
- description: Configuration Persistence Service API
- version: "1.0"
+ title: ONAP Open API v3 Configuration Persistence Service
+ description: Configuration Persistence Service is a Model Driven Generic Database
+ version: "1.0.0"
+ contact:
+ name: ONAP
+ url: "https://onap.readthedocs.io"
+ email: "onap-discuss@lists.onap.org"
+ license:
+ name: "Apache 2.0"
+ url: "http://www.apache.org/licenses/LICENSE-2.0"
+ x-planned-retirement-date: "202212"
+ x-component: "Modeling"
+ x-logo:
+ url: "cps_logo.png"
+
servers:
- - url: //localhost:8088/
+ - url: //localhost:8088
tags:
- - name: cps-rest
- description: cps Resource
+ - name: cps-admin
+ description: cps Admin
+ - name: cps-data
+ description: cps Data
paths:
- /v1/dataspaces/{dataspace-name}/:
- delete:
- tags:
- - cps-rest
- summary: Delete the given dataspace
- operationId: deleteDataspace
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 204:
- description: No Content
- content: {}
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
+
+ /v1/dataspaces:
+ $ref: 'cpsAdmin.yml#/dataspaces'
+
+ /v1/dataspaces/{dataspace-name}:
+ $ref: 'cpsAdmin.yml#/dataspaceByDataspaceName'
+
/v1/dataspaces/{dataspace-name}/anchors:
- get:
- tags:
- - cps-rest
- summary: Read all anchors, given a dataspace
- operationId: getAnchors
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
- post:
- tags:
- - cps-rest
- summary: Create a new anchor in the given dataspace
- operationId: createAnchor
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- title: Anchor
- description: anchor
- $ref: '#/components/schemas/Anchor'
- required: true
- responses:
- 201:
- description: Created
- content:
- application/json:
- schema:
- type: string
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
+ $ref: 'cpsAdmin.yml#/anchorsByDataspace'
+
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
- get:
- tags:
- - cps-rest
- summary: Read an anchor given a anchor and a dataspace
- operationId: getAnchor
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
- delete:
- tags:
- - cps-rest
- summary: Delete an anchor given a anchor and a dataspace
- operationId: deleteAnchor
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 204:
- description: No Content
- content: {}
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
+ $ref: 'cpsAdmin.yml#/anchorByDataspaceAndAnchorName'
+
+ /v1/dataspaces/{dataspace-name}/schema-sets:
+ $ref: 'cpsAdmin.yml#/schemaSet'
+
+ /v1/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}:
+ $ref: 'cpsAdmin.yml#/schemaSetBySchemaSetName'
+
+ /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
+ $ref: 'cpsData.yml#/nodeByDataspaceAndAnchor'
+
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
- get:
- tags:
- - cps-rest
- summary: Get a node given an anchor for the given dataspace
- operationId: getNodeByDataspaceAndAnchor
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: anchor-name
- in: path
- description: anchor-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
- x-codegen-request-body-name: xpath
- /v1/dataspaces/{dataspace-name}/modules:
- get:
- tags:
- - cps-rest
- summary: Read all yang modules in the store
- operationId: getModule
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- - name: namespace-name
- in: query
- description: namespace-name
- schema:
- type: string
- - name: revision
- in: query
- description: revision
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
- post:
- tags:
- - cps-rest
- summary: Create modules for the given dataspace
- operationId: createModules
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- requestBody:
- content:
- multipart/form-data:
- schema:
- required:
- - file
- properties:
- multipartFile:
- type: string
- description: multipartFile
- format: binary
- required: true
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 201:
- description: Created
- content: {}
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
+ $ref: 'cpsData.yml#/nodesByDataspaceAndAnchor'
+
/v1/dataspaces/{dataspace-name}/nodes:
- get:
- tags:
- - cps-rest
- summary: Get all nodes for a given dataspace using an xpath or schema node identifier
- operationId: getNode
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
- x-codegen-request-body-name: requestBody
- post:
- tags:
- - cps-rest
- summary: Create a node for a given anchor for the given dataspace
- operationId: createNode
- parameters:
- - name: dataspace-name
- in: path
- description: dataspace-name
- required: true
- schema:
- type: string
- requestBody:
- content:
- multipart/form-data:
- schema:
- required:
- - file
- properties:
- multipartFile:
- type: string
- description: multipartFile
- format: binary
- required: true
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- 201:
- description: Created
- content: {}
- 401:
- description: Unauthorized
- content: {}
- 403:
- description: Forbidden
- content: {}
- 404:
- description: Not Found
- content: {}
-components:
- schemas:
- ErrorMessage:
- type: object
- title: Error
- properties:
- status:
- type: string
- message:
- type: string
- details:
- type: string
- Anchor:
- type: object
- title: Anchor
- required:
- - anchorName
- - namespace
- - revision
- properties:
- anchorName:
- type: string
- namespace:
- type: string
- revision:
- type: string
+ $ref: 'cpsData.yml#/nodesByDataspace'
+
+ /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
+ $ref: 'cpsQuery.yml#/nodesByDataspaceAndAnchorAndCpsPath'
\ No newline at end of file