Merge "[k6] Refactor k6 tests for CM handle searches"
[cps.git] / docs / api / swagger / ncmp / openapi.yaml
index 8098fae..7b33fa1 100644 (file)
@@ -28,8 +28,7 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - allowReserved: true
-        description: The format of resource identifier depend on the associated DMI
+      - 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.
         examples:
@@ -56,6 +55,12 @@ paths:
           default: application/json
           example: application/yang-data+json
           type: string
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       responses:
         "204":
           content: {}
@@ -64,22 +69,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -143,8 +138,7 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - allowReserved: true
-        description: The format of resource identifier depend on the associated DMI
+      - 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.
         examples:
@@ -162,8 +156,7 @@ paths:
         required: true
         schema:
           type: string
-      - allowReserved: true
-        description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
+      - 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."
         examples:
@@ -181,8 +174,7 @@ paths:
         required: false
         schema:
           type: string
-      - allowReserved: true
-        description: topic parameter in query.
+      - description: topic parameter in query.
         examples:
           sample 1:
             value:
@@ -199,6 +191,12 @@ paths:
         schema:
           default: false
           type: boolean
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       responses:
         "200":
           content:
@@ -214,22 +212,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -284,8 +272,7 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - allowReserved: true
-        description: The format of resource identifier depend on the associated DMI
+      - 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.
         examples:
@@ -312,6 +299,12 @@ paths:
           default: application/json
           example: application/yang-data+json
           type: string
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       requestBody:
         content:
           '*/*':
@@ -333,22 +326,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -402,8 +385,7 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - allowReserved: true
-        description: The format of resource identifier depend on the associated DMI
+      - 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.
         examples:
@@ -430,6 +412,12 @@ paths:
           default: application/json
           example: application/yang-data+json
           type: string
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       requestBody:
         content:
           application/json:
@@ -455,22 +443,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -525,8 +503,7 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - allowReserved: true
-        description: The format of resource identifier depend on the associated DMI
+      - 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.
         examples:
@@ -553,6 +530,12 @@ paths:
           default: application/json
           example: application/yang-data+json
           type: string
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       requestBody:
         content:
           application/json:
@@ -581,22 +564,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -635,11 +608,11 @@ paths:
     post:
       description: This request will be handled asynchronously using messaging to
         the supplied topic. The rest response will be an acknowledge with a requestId
-        to identify the relevant messages.
+        to identify the relevant messages. A maximum of 50 cm handles per operation
+        is supported.
       operationId: executeDataOperationForCmHandles
       parameters:
-      - allowReserved: true
-        description: mandatory topic parameter in query.
+      - description: mandatory topic parameter in query.
         examples:
           sample 1:
             value:
@@ -649,6 +622,12 @@ paths:
         required: true
         schema:
           type: string
+      - description: Authorization parameter for request.
+        in: header
+        name: Authorization
+        required: false
+        schema:
+          type: string
       requestBody:
         content:
           application/json:
@@ -666,22 +645,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -692,6 +661,17 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Forbidden
+        "413":
+          content:
+            application/json:
+              example:
+                status: 413
+                message: Payload Too Large error message
+                details: Payload Too Large error details
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: The request is larger than the server is willing or able to
+            process
         "500":
           content:
             application/json:
@@ -748,8 +728,7 @@ paths:
         schema:
           default: /
           type: string
-      - allowReserved: true
-        description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
+      - 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."
         examples:
@@ -767,8 +746,7 @@ paths:
         required: false
         schema:
           type: string
-      - allowReserved: true
-        description: topic parameter in query.
+      - description: topic parameter in query.
         examples:
           sample 1:
             value:
@@ -800,22 +778,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -877,22 +845,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -918,9 +876,9 @@ paths:
       - network-cm-proxy
   /v1/ch/{cm-handle}/modules/definitions:
     get:
-      description: "Fetch all module definitions (name, revision, yang resource) for\
-        \ a given cm handle"
-      operationId: getModuleDefinitionsByCmHandleId
+      description: "Get module definitions (module name, revision, yang resource)\
+        \ with options to filter on module name and revision"
+      operationId: getModuleDefinitions
       parameters:
       - description: "The identifier for a network function, network element, subnetwork\
           \ or any other cm object by managed Network CM Proxy"
@@ -930,6 +888,21 @@ paths:
         schema:
           example: my-cm-handle
           type: string
+      - description: Filter for a module name.This is an optional parameter
+        in: query
+        name: module-name
+        required: false
+        schema:
+          example: my-module
+          type: string
+      - description: Filter for a module revision.This is an optional parameter and
+          ignored when no module name is supplied
+        in: query
+        name: revision
+        required: false
+        schema:
+          example: 2024-01-22
+          type: string
       responses:
         "200":
           content:
@@ -939,16 +912,6 @@ paths:
                   $ref: '#/components/schemas/RestModuleDefinition'
                 type: array
           description: OK
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -969,8 +932,7 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Internal Server Error
-      summary: "Fetch all module definitions (name, revision, yang resource) for a\
-        \ given cm handle"
+      summary: Get module definitions
       tags:
       - network-cm-proxy
   /v1/ch/searches:
@@ -1021,22 +983,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1084,22 +1036,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "404":
           content:
             application/json:
@@ -1147,22 +1089,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "404":
           content:
             application/json:
@@ -1234,22 +1166,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1307,22 +1229,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "404":
           content:
             application/json:
@@ -1379,22 +1291,12 @@ paths:
           content:
             application/json:
               example:
-                status: 400 BAD_REQUEST
+                status: 400
                 message: Bad request error message
                 details: Bad request error details
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Bad Request
-        "401":
-          content:
-            application/json:
-              example:
-                status: 401
-                message: Unauthorized error message
-                details: Unauthorized error details
-              schema:
-                $ref: '#/components/schemas/ErrorMessage'
-          description: Unauthorized
         "403":
           content:
             application/json:
@@ -1572,7 +1474,6 @@ components:
         example: my-cm-handle
         type: string
     resourceIdentifierInQuery:
-      allowReserved: true
       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.
@@ -1592,7 +1493,6 @@ components:
       schema:
         type: string
     optionsParamInQuery:
-      allowReserved: true
       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."
@@ -1612,7 +1512,6 @@ components:
       schema:
         type: string
     topicParamInQuery:
-      allowReserved: true
       description: topic parameter in query.
       examples:
         sample 1:
@@ -1631,6 +1530,13 @@ components:
       schema:
         default: false
         type: boolean
+    authorizationParamInHeader:
+      description: Authorization parameter for request.
+      in: header
+      name: Authorization
+      required: false
+      schema:
+        type: string
     contentParamInHeader:
       description: "Content parameter for request, if content parameter is null, default\
         \ value is application/json."
@@ -1642,7 +1548,6 @@ components:
         example: application/yang-data+json
         type: string
     requiredTopicParamInQuery:
-      allowReserved: true
       description: mandatory topic parameter in query.
       examples:
         sample 1:
@@ -1666,6 +1571,23 @@ components:
       schema:
         default: /
         type: string
+    moduleNameInQuery:
+      description: Filter for a module name.This is an optional parameter
+      in: query
+      name: module-name
+      required: false
+      schema:
+        example: my-module
+        type: string
+    revisionInQuery:
+      description: Filter for a module revision.This is an optional parameter and
+        ignored when no module name is supplied
+      in: query
+      name: revision
+      required: false
+      schema:
+        example: 2024-01-22
+        type: string
     dataSyncEnabled:
       description: Is used to enable or disable the data synchronization flag
       in: query
@@ -1679,22 +1601,12 @@ components:
       content:
         application/json:
           example:
-            status: 400 BAD_REQUEST
+            status: 400
             message: Bad request error message
             details: Bad request error details
           schema:
             $ref: '#/components/schemas/ErrorMessage'
       description: Bad Request
-    Unauthorized:
-      content:
-        application/json:
-          example:
-            status: 401
-            message: Unauthorized error message
-            details: Unauthorized error details
-          schema:
-            $ref: '#/components/schemas/ErrorMessage'
-      description: Unauthorized
     Forbidden:
       content:
         application/json:
@@ -1748,6 +1660,16 @@ components:
           schema:
             $ref: '#/components/schemas/ErrorMessage'
       description: The specified resource was not found
+    PayloadTooLarge:
+      content:
+        application/json:
+          example:
+            status: 413
+            message: Payload Too Large error message
+            details: Payload Too Large error details
+          schema:
+            $ref: '#/components/schemas/ErrorMessage'
+      description: The request is larger than the server is willing or able to process
   schemas:
     ErrorMessage:
       properties:
@@ -1829,6 +1751,8 @@ components:
           type: string
         targetIds:
           items:
+            description: "targeted cm handles, maximum of 50 supported. If this limit\
+              \ is exceeded the request wil be refused."
             example: "[\"da310eecdb8d44c2acc0ddaae01174b1\",\"c748c58f8e0b438f9fd1f28370b17d47\"\
               ]"
             type: string
@@ -1957,6 +1881,8 @@ components:
     RestOutputCmHandle:
       example:
         cmHandle: my-cm-handle1
+        alternateId: my-alternate-id
+        dataProducerIdentifier: my-data-producer-identifier
         publicCmHandleProperties:
         - key: Book Type
         - key: Book Type
@@ -1975,6 +1901,7 @@ components:
             details: locked due to failure in module sync
           lastUpdateTime: 2022-12-31T20:30:40.000+0000
         trustLevel: COMPLETE
+        moduleSetTag: my-module-set-tag
       properties:
         cmHandle:
           example: my-cm-handle1
@@ -1992,6 +1919,15 @@ components:
           description: Current trust level of the relevant CM handle ID.
           example: COMPLETE
           type: string
+        moduleSetTag:
+          example: my-module-set-tag
+          type: string
+        alternateId:
+          example: my-alternate-id
+          type: string
+        dataProducerIdentifier:
+          example: my-data-producer-identifier
+          type: string
       title: CM handle Details
       type: object
     CmHandlePublicProperties: