Merge "Subscription model with status and predicates"
[cps.git] / docs / api / swagger / cps / openapi.yaml
index 53c72f5..9f28526 100644 (file)
@@ -1320,8 +1320,8 @@ paths:
               value: "/shops/bookstore/categories[@code=1]"
         - name: descendants
           in: query
-          description: "descendents to query depth of children. allowed values are none,\
-          \ all, any number starting from -1"
+          description: "Number of descendants to query. Allowed values are 'none', 'all',\
+          \ -1 (for all), 0 (for none) and any positive number."
           required: false
           schema:
             type: string
@@ -1720,8 +1720,8 @@ paths:
       tags:
         - cps-data
       summary: Update node leaves
-      description: Update a data node leaves for a given dataspace and anchor and
-        a parent node xpath
+      description: Update a data node leaves for a given dataspace and anchor and a parent node xpath. This
+        operation is currently supported for one top level data node only.
       operationId: updateNodeLeaves
       parameters:
         - name: apiVersion
@@ -2256,8 +2256,95 @@ paths:
               value: "//categories[@code=1]"
         - name: descendants
           in: query
-          description: "descendents to query depth of children. allowed values are none,\
-          \ all, any number starting from -1"
+          description: "Number of descendants to query. Allowed values are 'none', 'all',\
+          \ -1 (for all), 0 (for none) and any positive number."
+          required: false
+          schema:
+            type: string
+            example: "3"
+            default: none
+      responses:
+        "200":
+          description: OK
+          content:
+            application/json:
+              schema:
+                type: object
+              examples:
+                dataSample:
+                  $ref: '#/components/examples/dataSample'
+        "400":
+          description: Bad Request
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400
+                message: Bad Request
+                details: The provided request is not valid
+        "401":
+          description: Unauthorized
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized request
+                details: This request is unauthorized
+        "403":
+          description: Forbidden
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 403
+                message: Request Forbidden
+                details: This request is forbidden
+        "500":
+          description: Internal Server Error
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+      x-codegen-request-body-name: xpath
+  /v2/dataspaces/{dataspace-name}/nodes/query:
+    get:
+      tags:
+        - cps-query
+      summary: Query data nodes
+      description: Query data nodes for the given dataspace and anchor using CPS path
+      operationId: getNodesByDataspaceAndCpsPath
+      parameters:
+        - name: dataspace-name
+          in: path
+          description: dataspace-name
+          required: true
+          schema:
+            type: string
+            example: my-dataspace
+        - name: cps-path
+          in: query
+          description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
+          required: false
+          schema:
+            type: string
+            default: /
+          examples:
+            container cps path:
+              value: //bookstore
+            list attributes cps path:
+              value: "//categories[@code=1]"
+        - name: descendants
+          in: query
+          description: "Number of descendants to query. Allowed values are 'none', 'all',\
+          \ -1 (for all), 0 (for none) and any positive number."
           required: false
           schema:
             type: string