[cps] Fix getResourceDataForPassthroughOperational endpoint
[cps.git] / docs / api / swagger / ncmp / openapi.yaml
index cbe371b..a43190b 100644 (file)
@@ -6,14 +6,13 @@ info:
 servers:
 - url: /ncmp
 paths:
-  /v1/cm-handles/{cm-handle}/node:
+  /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational:
     get:
       tags:
       - network-cm-proxy
-      summary: Get a node given a cm Handle and xpath
-      description: Get a node with an option to retrieve all the children for a given
-        cm Handle
-      operationId: getNodeByCmHandleAndXpath
+      summary: Get resource data from pass-through operational for cm handle
+      description: Get resource data from pass-through operational for given cm handle
+      operationId: getResourceDataOperationalForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -22,20 +21,56 @@ paths:
         required: true
         schema:
           type: string
-      - name: xpath
+          example: my-cm-handle
+      - name: resourceIdentifier
         in: query
-        description: xpath
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
+        required: true
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: options
+        in: query
+        description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
+          \ in parenthesis'()'. The format of options parameter depend on the associated\
+          \ DMI Plugin implementation."
         required: false
+        allowReserved: true
         schema:
           type: string
-          default: /
-      - name: include-descendants
+        examples:
+          sample 1:
+            value:
+              options: (depth=3)
+          sample 2:
+            value:
+              options: (fields=book)
+          sample 3:
+            value:
+              options: "(depth=2,fields=book/authors)"
+      - name: topic
         in: query
-        description: include-descendants
+        description: topic parameter in query.
         required: false
+        allowReserved: true
         schema:
-          type: boolean
-          default: false
+          type: string
+        examples:
+          sample 1:
+            value:
+              topic: my-topic-name
       responses:
         "200":
           description: OK
@@ -43,95 +78,68 @@ paths:
             application/json:
               schema:
                 type: object
+              examples:
+                dataSampleResponse:
+                  $ref: '#/components/examples/dataSampleResponse'
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
-  /v1/cm-handles/{cm-handle}/list-node:
-    post:
-      tags:
-      - network-cm-proxy
-      summary: Add list-node child element(s)
-      description: Add one or more list-node child elements under existing node for
-        the given CM Handle
-      operationId: addListNodeElements
-      parameters:
-      - name: cm-handle
-        in: path
-        description: "The identifier for a network function, network element, subnetwork\
-          \ or any other cm object by managed Network CM Proxy"
-        required: true
-        schema:
-          type: string
-      - name: xpath
-        in: query
-        description: xpath
-        required: true
-        schema:
-          type: string
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: string
-        required: true
-      responses:
-        "201":
-          description: Created
-          content: {}
-        "400":
-          description: Bad Request
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-        "401":
-          description: Unauthorized
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "403":
-          description: Forbidden
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
           content:
             application/json:
               schema:
-                $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
-  /v1/cm-handles/{cm-handle}/nodes/query:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
+
+  /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running:
     get:
       tags:
       - network-cm-proxy
-      summary: Query data nodes
-      description: Query nodes for the given cps path and cm Handle
-      operationId: queryNodesByCmHandleAndCpsPath
+      summary: Get resource data from pass-through running for cm handle
+      description: Get resource data from pass-through running for given cm handle
+      operationId: getResourceDataRunningForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -140,20 +148,56 @@ paths:
         required: true
         schema:
           type: string
-      - name: cps-path
+          example: my-cm-handle
+      - name: resourceIdentifier
         in: query
-        description: cps-path
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
+        required: true
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: options
+        in: query
+        description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
+          \ in parenthesis'()'. The format of options parameter depend on the associated\
+          \ DMI Plugin implementation."
         required: false
+        allowReserved: true
         schema:
           type: string
-          default: /
-      - name: include-descendants
+        examples:
+          sample 1:
+            value:
+              options: (depth=3)
+          sample 2:
+            value:
+              options: (fields=book)
+          sample 3:
+            value:
+              options: "(depth=2,fields=book/authors)"
+      - name: topic
         in: query
-        description: include-descendants
+        description: topic parameter in query.
         required: false
+        allowReserved: true
         schema:
-          type: boolean
-          default: false
+          type: string
+        examples:
+          sample 1:
+            value:
+              topic: my-topic-name
       responses:
         "200":
           description: OK
@@ -161,38 +205,67 @@ paths:
             application/json:
               schema:
                 type: object
+              examples:
+                dataSampleResponse:
+                  $ref: '#/components/examples/dataSampleResponse'
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
-  /v1/cm-handles/{cm-handle}/nodes:
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     put:
       tags:
       - network-cm-proxy
-      summary: Replace a node with descendants
-      description: Replace a node with descendants for the given cps path and cm Handle
-      operationId: replaceNode
+      summary: Update resource data from pass-through running for a cm handle
+      description: Update resource data from pass-through running for the given cm
+        handle
+      operationId: updateResourceDataRunningForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -201,18 +274,49 @@ paths:
         required: true
         schema:
           type: string
-      - name: xpath
+          example: my-cm-handle
+      - name: resourceIdentifier
         in: query
-        description: xpath
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
+        required: true
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: Content-Type
+        in: header
+        description: "Content parameter for request, if content parameter is null,\
+          \ default value is application/json."
         required: false
         schema:
           type: string
-          default: /
+          example: application/yang-data+json
+          default: application/json
       requestBody:
         content:
           application/json:
             schema:
-              type: string
+              type: object
+            examples:
+              dataSampleRequest:
+                $ref: '#/components/examples/dataSampleRequest'
+          application/yang-data+json:
+            schema:
+              type: object
+            examples:
+              dataSampleRequest:
+                $ref: '#/components/examples/dataSampleRequest'
         required: true
       responses:
         "200":
@@ -227,32 +331,57 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     post:
       tags:
       - network-cm-proxy
-      summary: Create a node with descendants
-      description: Create a node with descendants for the given CM Handle; top level
-        or under existing node (requires xpath)
-      operationId: createNode
+      summary: create resource data from pass-through running for cm handle
+      description: create resource data from pass-through running for given cm handle
+      operationId: createResourceDataRunningForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -261,18 +390,49 @@ paths:
         required: true
         schema:
           type: string
-      - name: xpath
+          example: my-cm-handle
+      - name: resourceIdentifier
         in: query
-        description: xpath
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
+        required: true
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: Content-Type
+        in: header
+        description: "Content parameter for request, if content parameter is null,\
+          \ default value is application/json."
         required: false
         schema:
           type: string
-          default: /
+          example: application/yang-data+json
+          default: application/json
       requestBody:
         content:
           application/json:
             schema:
-              type: string
+              type: object
+            examples:
+              dataSampleRequest:
+                $ref: '#/components/examples/dataSampleRequest'
+          application/yang-data+json:
+            schema:
+              type: object
+            examples:
+              dataSampleRequest:
+                $ref: '#/components/examples/dataSampleRequest'
         required: true
       responses:
         "201":
@@ -284,31 +444,57 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
-    patch:
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
+    delete:
       tags:
       - network-cm-proxy
-      summary: Update node leaves
-      description: Update node leaves for the given cps path and cm Handle
-      operationId: updateNodeLeaves
+      summary: Delete resource data
+      description: Delete resource data from pass-through running for a given cm handle
+      operationId: deleteResourceDataRunningForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -317,93 +503,107 @@ paths:
         required: true
         schema:
           type: string
-      - name: xpath
+          example: my-cm-handle
+      - name: resourceIdentifier
         in: query
-        description: xpath
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
+        required: true
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: Content-Type
+        in: header
+        description: "Content parameter for request, if content parameter is null,\
+          \ default value is application/json."
         required: false
         schema:
           type: string
-          default: /
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: string
-        required: true
+          example: application/yang-data+json
+          default: application/json
       responses:
-        "200":
-          description: OK
-          content:
-            application/json:
-              schema:
-                type: object
+        "204":
+          description: No Content
+          content: {}
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
         "404":
           description: The specified resource was not found
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-      deprecated: true
-  /v1/ch:
-    post:
-      tags:
-      - network-cm-proxy
-      summary: DMI notifies NCMP of new CM Handles
-      description: "Register a DMI Plugin with any new, updated or removed CM Handles."
-      operationId: updateDmiPluginRegistration
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/RestDmiPluginRegistration'
-        required: true
-      responses:
-        "201":
-          description: Created
-          content: {}
-        "400":
-          description: Bad Request
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-        "401":
-          description: Unauthorized
+              example:
+                status: 400
+                message: Not found error message
+                details: Not found error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "403":
-          description: Forbidden
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
           content:
             application/json:
               schema:
-                $ref: '#/components/schemas/ErrorMessage'
-  /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational/{resourceIdentifier}:
-    get:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
+    patch:
       tags:
       - network-cm-proxy
-      summary: Get resource data from pass-through operational for cm handle
-      description: Get resource data from pass-through operational for given cm handle
-      operationId: getResourceDataOperationalForCmHandle
+      summary: Patch resource data from pass-through running
+      description: Patch resource data from pass-through running for the given cm
+        handle
+      operationId: patchResourceDataRunningForCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -412,35 +612,44 @@ paths:
         required: true
         schema:
           type: string
+          example: my-cm-handle
       - name: resourceIdentifier
-        in: path
-        description: Resource identifier to get/set the resource data
+        in: query
+        description: The format of resource identifier depend on the associated DMI
+          Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
+          it can really be anything.
         required: true
+        allowReserved: true
         schema:
           type: string
-      - name: Accept
+        examples:
+          sample 1:
+            value:
+              resourceIdentifier: \shops\bookstore
+          sample 2:
+            value:
+              resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]"
+          sample 3:
+            value:
+              resourceIdentifier: "parent=shops,child=bookstore"
+      - name: Content-Type
         in: header
-        description: "Accept parameter for response, if accept parameter is null,\
-          \ that means client can accept any format."
-        required: false
-        schema:
-          type: string
-          enum:
-          - application/json
-          - application/yang-data+json
-      - name: fields
-        in: query
-        description: Fields parameter to filter resource
+        description: "Content parameter for request, if content parameter is null,\
+          \ default value is application/json."
         required: false
         schema:
           type: string
-      - name: depth
-        in: query
-        description: Depth parameter for response
-        required: false
-        schema:
-          minimum: 1
-          type: integer
+          example: application/yang-data+json
+          default: application/json
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              type: object
+            examples:
+              dataSampleRequest:
+                $ref: '#/components/examples/dataSamplePatchRequest'
+        required: true
       responses:
         "200":
           description: OK
@@ -454,31 +663,59 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-  /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running/{resourceIdentifier}:
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
+  /v1/ch/{cm-handle}/modules:
     get:
       tags:
       - network-cm-proxy
-      summary: Get resource data from pass-through running for cm handle
-      description: Get resource data from pass-through running for given cm handle
-      operationId: getResourceDataRunningForCmHandle
+      summary: Fetch all module references (name and revision) for a given cm handle
+      description: fetch all module references (name and revision) for a given cm
+        handle
+      operationId: getModuleReferencesByCmHandle
       parameters:
       - name: cm-handle
         in: path
@@ -487,139 +724,124 @@ paths:
         required: true
         schema:
           type: string
-      - name: resourceIdentifier
-        in: path
-        description: Resource identifier to get/set the resource data
-        required: true
-        schema:
-          type: string
-      - name: Accept
-        in: header
-        description: "Accept parameter for response, if accept parameter is null,\
-          \ that means client can accept any format."
-        required: false
-        schema:
-          type: string
-          enum:
-          - application/json
-          - application/yang-data+json
-      - name: fields
-        in: query
-        description: Fields parameter to filter resource
-        required: false
-        schema:
-          type: string
-      - name: depth
-        in: query
-        description: Depth parameter for response
-        required: false
-        schema:
-          minimum: 1
-          type: integer
+          example: my-cm-handle
       responses:
         "200":
           description: OK
           content:
             application/json:
               schema:
-                type: object
+                type: array
+                items:
+                  $ref: '#/components/schemas/RestModuleReference'
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "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
+  /v1/ch/searches:
     post:
       tags:
       - network-cm-proxy
-      summary: create resource data from pass-through running for cm handle
-      description: create resource data from pass-through running for given cm handle
-      operationId: createResourceDataRunningForCmHandle
-      parameters:
-      - name: cm-handle
-        in: path
-        description: "The identifier for a network function, network element, subnetwork\
-          \ or any other cm object by managed Network CM Proxy"
-        required: true
-        schema:
-          type: string
-      - name: resourceIdentifier
-        in: path
-        description: Resource identifier to get/set the resource data
-        required: true
-        schema:
-          type: string
-      - name: Content-Type
-        in: header
-        description: "Content parameter for request, if content parameter is null,\
-          \ default value is application/json."
-        required: false
-        schema:
-          type: string
-          default: application/json
+      summary: Execute cm handle search using the available conditions
+      description: Execute cm handle searches using 'hasAllModules' condition to get
+        all cm handles for the given module names
+      operationId: executeCmHandleSearch
       requestBody:
         content:
           application/json:
             schema:
-              type: string
-          application/yang-data+json:
-            schema:
-              type: string
+              $ref: '#/components/schemas/Conditions'
         required: true
       responses:
-        "201":
-          description: Created
-          content: {}
+        "200":
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/CmHandles'
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-        "404":
-          description: The specified resource was not found
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
+        "500":
+          description: Internal Server Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
-  /v1/ch/{cm-handle}/modules:
+              example:
+                status: 500
+                message: Internal Server Error
+                details: Internal Server Error occurred
+  /v1/ch/{cm-handle}:
     get:
       tags:
       - network-cm-proxy
-      summary: Fetch all module references (name and revision) for a given cm handle
-      description: fetch all module references (name and revision) for a given cm
-        handle
-      operationId: getModuleReferencesByCmHandle
+      summary: Retrieve CM handle details
+      description: Retrieve CM handle details and properties by cm handle id
+      operationId: retrieveCmHandleDetailsById
       parameters:
       - name: cm-handle
         in: path
@@ -628,37 +850,64 @@ paths:
         required: true
         schema:
           type: string
+          example: my-cm-handle
       responses:
         "200":
           description: OK
           content:
             application/json:
               schema:
-                type: object
+                $ref: '#/components/schemas/RestOutputCmHandle'
         "400":
           description: Bad Request
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400 BAD_REQUEST
+                message: Bad request error message
+                details: Bad request error details
         "401":
           description: Unauthorized
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 401
+                message: Unauthorized error message
+                details: Unauthorized error details
         "403":
           description: Forbidden
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 403
+                message: Forbidden error message
+                details: Forbidden error details
         "404":
           description: The specified resource was not found
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
+              example:
+                status: 400
+                message: Not found error message
+                details: Not found error details
+        "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
 components:
   schemas:
     ErrorMessage:
@@ -671,36 +920,164 @@ components:
           type: string
         details:
           type: string
-    RestDmiPluginRegistration:
+    # DMI Server Exception Schema
+    DmiErrorMessage:
+      title: DMI Error Message
+      type: object
+      properties:
+        message:
+          type: string
+          example: "Bad Gateway Error Message NCMP"
+        dmi-response:
+          type: object
+          properties:
+            http-code:
+              type: integer
+              example: 400
+            body:
+              type: string
+              example: Bad Request
+    RestModuleReference:
+      title: Module reference details
       type: object
       properties:
-        dmiPlugin:
-          type: string
-          example: onap-dmi-plugin
-        createdCmHandles:
-          type: array
-          items:
-            $ref: '#/components/schemas/RestCmHandle'
-        updatedCmHandles:
-          type: array
-          items:
-            $ref: '#/components/schemas/RestCmHandle'
-        removedCmHandles:
-          type: array
-          items:
-            type: string
-    RestCmHandle:
-      required:
-      - cmHandle
+        moduleName:
+          type: string
+          example: my-module-name
+        revision:
+          type: string
+          example: my-module-revision
+    Conditions:
       type: object
       properties:
-        cmHandle:
+        conditions:
+          $ref: '#/components/schemas/ConditionsData'
+    ConditionsData:
+      type: array
+      items:
+        $ref: '#/components/schemas/ConditionProperties'
+    ConditionProperties:
+      properties:
+        name:
+          type: string
+          example: hasAllModules
+        conditionParameters:
+          $ref: '#/components/schemas/ModuleNamesAsJsonArray'
+    ModuleNamesAsJsonArray:
+      type: array
+      items:
+        $ref: '#/components/schemas/ModuleNameAsJsonObject'
+    ModuleNameAsJsonObject:
+      properties:
+        moduleName:
           type: string
-          example: cmHandle123
-        cmHandleProperties:
-          $ref: '#/components/schemas/RestCmHandleAdditionalProperties'
-    RestCmHandleAdditionalProperties:
+          example: my-module
+    CmHandles:
       type: object
-      additionalProperties:
-        type: string
-        example: system-001
+      properties:
+        cmHandles:
+          $ref: '#/components/schemas/CmHandleProperties'
+    CmHandleProperties:
+      type: array
+      items:
+        $ref: '#/components/schemas/CmHandleProperty'
+    CmHandleProperty:
+      properties:
+        cmHandleId:
+          type: string
+          example: my-cm-handle-id
+    RestOutputCmHandle:
+      title: CM handle Details
+      type: object
+      properties:
+        cmHandle:
+          type: string
+          example: my-cm-handle1
+        publicCmHandleProperties:
+          $ref: '#/components/schemas/CmHandlePublicProperties'
+    CmHandlePublicProperties:
+      type: array
+      items:
+        type: object
+        additionalProperties:
+          type: string
+          example: Book Type
+  examples:
+    dataSampleResponse:
+      summary: Sample response
+      description: Sample response for selecting 'sample 1'.
+      value:
+        bookstore:
+          categories:
+          - code: "01"
+            books:
+            - authors:
+              - Iain M. Banks
+              - Ursula K. Le Guin
+            name: SciFi
+          - code: "02"
+            books:
+            - authors:
+              - Philip Pullman
+            name: kids
+    dataSampleRequest:
+      summary: Sample request
+      description: Sample request body
+      value:
+        test:bookstore:
+          bookstore-name: Chapters
+          categories:
+          - code: "01"
+            name: SciFi
+            books:
+            - authors:
+              - Iain M. Banks
+              - Ursula K. Le Guin
+          - code: "02"
+            name: kids
+            books:
+            - authors:
+              - Philip Pullman
+    dataSamplePatchRequest:
+      summary: Sample patch request
+      description: Sample patch request body
+      value:
+        ietf-restconf:yang-patch:
+          patch-id: patch-1
+          edit:
+          - edit-id: edit1
+            operation: merge
+            target: /
+            value:
+              test:bookstore:
+                bookstore-name: Chapters
+                categories:
+                - code: "01"
+                  name: Science
+                  books:
+                  - authors:
+                    - Author1
+                    - Author2
+                - code: "02"
+                  name: Arts
+                  books:
+                  - authors:
+                    - Author3
+          - edit-id: edit2
+            operation: merge
+            target: /
+            value:
+              test:bookstore:
+                bookstore-name: Novels
+                categories:
+                - code: "03"
+                  name: History
+                  books:
+                  - authors:
+                    - Iain M. Banks
+                    - Ursula K. Le Guin
+                - code: "04"
+                  name: Fiction
+                  books:
+                  - authors:
+                    - Philip Pullman