Release notes added for 3.4.6
[cps.git] / docs / api / swagger / cps / openapi.yaml
index 453494e..2798b78 100644 (file)
@@ -55,16 +55,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -134,16 +124,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -202,16 +182,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -279,16 +249,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -351,16 +311,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -429,16 +379,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -511,16 +451,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -595,16 +525,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -671,16 +591,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -749,16 +659,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -826,16 +726,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -907,16 +797,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -991,16 +871,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1067,16 +937,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1155,16 +1015,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1250,16 +1100,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1347,16 +1187,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1444,16 +1274,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1556,16 +1376,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1680,16 +1490,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1801,16 +1601,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1886,16 +1676,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1994,16 +1774,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -2103,16 +1873,98 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
+        "403":
+          content:
+            application/json:
+              example:
+                status: 403
+                message: Request Forbidden
+                details: This request is forbidden
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Forbidden
+        "500":
+          content:
+            application/json:
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Internal Server Error
+      summary: Replace list content
+      tags:
+      - cps-data
+  /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/delta:
+    get:
+      description: Get delta between two anchors within a given dataspace
+      operationId: getDeltaByDataspaceAndAnchors
+      parameters:
+      - description: dataspace-name
+        in: path
+        name: dataspace-name
+        required: true
+        schema:
+          example: my-dataspace
+          type: string
+      - description: anchor-name
+        in: path
+        name: anchor-name
+        required: true
+        schema:
+          example: my-anchor
+          type: string
+      - description: target-anchor-name
+        in: query
+        name: target-anchor-name
+        required: true
+        schema:
+          example: my-anchor
+          type: string
+      - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
+        examples:
+          container xpath:
+            value: /shops/bookstore
+          list attributes xpath:
+            value: "/shops/bookstore/categories[@code=1]"
+        in: query
+        name: xpath
+        required: false
+        schema:
+          default: /
+          type: string
+      - description: "Number of descendants to query. Allowed values are 'none', 'all',\
+          \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
+          \ number."
+        in: query
+        name: descendants
+        required: false
+        schema:
+          default: none
+          example: "3"
+          type: string
+      responses:
+        "200":
+          content:
+            application/json:
+              examples:
+                dataSample:
+                  $ref: '#/components/examples/deltaReportSample'
+                  value: null
+              schema:
+                type: object
+          description: OK
+        "400":
           content:
             application/json:
               example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
+                status: 400
+                message: Bad Request
+                details: The provided request is not valid
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
+          description: Bad Request
         "403":
           content:
             application/json:
@@ -2133,9 +1985,10 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Internal Server Error
-      summary: Replace list content
+      summary: Get delta between anchors in the same dataspace
       tags:
       - cps-data
+      x-codegen-request-body-name: xpath
   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
     get:
       deprecated: true
@@ -2197,16 +2050,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -2293,16 +2136,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -2399,16 +2232,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized request
-                details: This request is unauthorized
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -2448,6 +2271,24 @@ components:
       value: <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <bookstore xmlns="org:onap:ccsdk:sample">
         <bookstore-name>Chapters</bookstore-name> <categories> <code>1</code> <name>SciFi</name>
         </categories> </bookstore> </stores>
+    deltaReportSample:
+      value:
+      - action: ADD
+        xpath: "/bookstore/categories/[@code=3]"
+        target-data:
+          code: "3,"
+          name: kidz
+      - action: REMOVE
+        xpath: "/bookstore/categories/[@code=1]"
+        source-data:
+          code: "1,"
+          name: Fiction
+      - action: UPDATE
+        xpath: "/bookstore/categories/[@code=2]"
+        source-data:
+          name: Funny
+        target-data:
+          name: Comic
     dataSampleAcrossAnchors:
       value:
       - anchorName: bookstore1
@@ -2588,6 +2429,14 @@ components:
       required: true
       schema:
         type: string
+    targetAnchorNameInQuery:
+      description: target-anchor-name
+      in: query
+      name: target-anchor-name
+      required: true
+      schema:
+        example: my-anchor
+        type: string
     cpsPathInQuery:
       description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
       examples:
@@ -2637,16 +2486,6 @@ components:
           schema:
             $ref: '#/components/schemas/ErrorMessage'
       description: Bad Request
-    Unauthorized:
-      content:
-        application/json:
-          example:
-            status: 401
-            message: Unauthorized request
-            details: This request is unauthorized
-          schema:
-            $ref: '#/components/schemas/ErrorMessage'
-      description: Unauthorized
     Forbidden:
       content:
         application/json:
@@ -2732,9 +2571,6 @@ components:
       properties:
         file:
           description: multipartFile
-          example: !!binary |-
-            aHR0cHM6Ly9naXRodWIuY29tL29uYXAvY3BzL2Jsb2IvbWFzdGVyL2Nwcy1zZXJ2aWNlL3NyYy90
-            ZXN0L3Jlc291cmNlcy9ib29rc3RvcmUueWFuZw==
           format: binary
           type: string
       required: