From 52c5e54bcc48dd8a59b15e395542097b0491b4e9 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Tue, 2 May 2023 15:58:55 +0100 Subject: Update release docs - Also synched up the API changes in openapi yml file - Step 1 and 2 of the release process Issue-ID: CPS-1662 Change-Id: I5b9485497a27a3dee8639faedfa9c1bd8ed3265e Signed-off-by: mpriyank --- docs/api/swagger/cps/openapi.yaml | 208 +++++ docs/api/swagger/ncmp/openapi-inventory.yaml | 139 ++- docs/api/swagger/ncmp/openapi.yaml | 1237 ++++++++++++++++---------- 3 files changed, 1092 insertions(+), 492 deletions(-) (limited to 'docs/api') diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml index 6e611c4858..c0c9dd6971 100644 --- a/docs/api/swagger/cps/openapi.yaml +++ b/docs/api/swagger/cps/openapi.yaml @@ -2444,6 +2444,9 @@ components: type: string description: multipartFile format: binary + example: !!binary |- + aHR0cHM6Ly9naXRodWIuY29tL29uYXAvY3BzL2Jsb2IvbWFzdGVyL2Nwcy1zZXJ2aWNlL3NyYy90 + ZXN0L3Jlc291cmNlcy9ib29rc3RvcmUueWFuZw== SchemaSetDetails: title: Schema set details by dataspace and schemasetName required: @@ -2473,6 +2476,211 @@ components: revision: type: string example: my-module-reference-revision + responses: + Created: + description: Created + content: + text/plain: + schema: + type: string + example: my-resource + BadRequest: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 400 + message: Bad Request + details: The provided request is not valid + Unauthorized: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 401 + message: Unauthorized request + details: This request is unauthorized + Forbidden: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 403 + message: Request Forbidden + details: This request is forbidden + Conflict: + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 409 + message: Conflicting request + details: The request cannot be processed as the resource is in use. + InternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 500 + message: Internal Server Error + details: Internal Server Error occurred + NoContent: + description: No Content + content: {} + CreatedV2: + description: Created without response body + Ok: + description: OK + content: + application/json: + schema: + type: object + examples: + dataSample: + value: "" + parameters: + dataspaceNameInQuery: + name: dataspace-name + in: query + description: dataspace-name + required: true + schema: + type: string + example: my-dataspace + apiVersionInPath: + name: apiVersion + in: path + description: apiVersion + required: true + schema: + type: string + default: v2 + enum: + - v1 + - v2 + dataspaceNameInPath: + name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: string + example: my-dataspace + schemaSetNameInQuery: + name: schema-set-name + in: query + description: schema-set-name + required: true + schema: + type: string + example: my-schema-set + anchorNameInQuery: + name: anchor-name + in: query + description: anchor-name + required: true + schema: + type: string + example: my-anchor + anchorNameInPath: + name: anchor-name + in: path + description: anchor-name + required: true + schema: + type: string + example: my-anchor + schemaSetNameInPath: + name: schema-set-name + in: path + description: schema-set-name + required: true + schema: + type: string + example: my-schema-set + xpathInQuery: + name: xpath + in: query + description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html" + required: false + schema: + type: string + default: / + examples: + container xpath: + value: /shops/bookstore + list attributes xpath: + value: "/shops/bookstore/categories[@code=1]" + includeDescendantsOptionInQuery: + name: include-descendants + in: query + description: include-descendants + required: false + schema: + type: boolean + example: false + default: false + descendantsInQuery: + 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 + example: "3" + default: none + observedTimestampInQuery: + name: observed-timestamp + in: query + description: observed-timestamp + required: false + schema: + type: string + example: 2021-03-21T00:10:34.030-0100 + contentTypeHeader: + name: Content-Type + in: header + description: Content type header + required: true + schema: + type: string + example: application/json + requiredXpathInQuery: + name: xpath + in: query + description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html" + required: true + schema: + type: string + examples: + container xpath: + value: /shops/bookstore + list attributes xpath: + value: "/shops/bookstore/categories[@code=1]" + cpsPathInQuery: + 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]" examples: dataSample: value: diff --git a/docs/api/swagger/ncmp/openapi-inventory.yaml b/docs/api/swagger/ncmp/openapi-inventory.yaml index 3bf93a1e54..2454de7efd 100644 --- a/docs/api/swagger/ncmp/openapi-inventory.yaml +++ b/docs/api/swagger/ncmp/openapi-inventory.yaml @@ -4,14 +4,14 @@ info: description: NCMP Inventory API version: "1.0" servers: - - url: /ncmpInventory +- url: /ncmpInventory security: - - basicAuth: [] +- basicAuth: [] paths: /v1/ch: post: tags: - - network-cm-proxy-inventory + - network-cm-proxy-inventory summary: DMI notifies NCMP of new CM Handles description: "Register a DMI Plugin with any new, updated or removed CM Handles." operationId: updateDmiPluginRegistration @@ -65,51 +65,51 @@ paths: $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse' example: failedCreatedCmHandles: - - cmHandle: my-cm-handle-01 - errorCode: "00" - errorText: Unknown error. - - cmHandle: my-cm-handle-02 - errorCode: "01" - errorText: cm-handle already exists - - cmHandle: my-cm-handle-03 - errorCode: "03" - errorText: cm-handle has an invalid character(s) in id + - cmHandle: my-cm-handle-01 + errorCode: "00" + errorText: Unknown error. + - cmHandle: my-cm-handle-02 + errorCode: "01" + errorText: cm-handle already exists + - cmHandle: my-cm-handle-03 + errorCode: "03" + errorText: cm-handle has an invalid character(s) in id failedUpdatedCmHandles: - - cmHandle: my-cm-handle-01 - errorCode: "00" - errorText: Unknown error. - - cmHandle: my-cm-handle-02 - errorCode: "02" - errorText: cm-handle does not exist - - cmHandle: my-cm-handle-03 - errorCode: "03" - errorText: cm-handle has an invalid character(s) in id + - cmHandle: my-cm-handle-01 + errorCode: "00" + errorText: Unknown error. + - cmHandle: my-cm-handle-02 + errorCode: "02" + errorText: cm-handle does not exist + - cmHandle: my-cm-handle-03 + errorCode: "03" + errorText: cm-handle has an invalid character(s) in id failedRemovedCmHandles: - - cmHandle: my-cm-handle-01 - errorCode: "00" - errorText: Unknown error. - - cmHandle: my-cm-handle-02 - errorCode: "02" - errorText: cm-handle does not exists - - cmHandle: my-cm-handle-03 - errorCode: "03" - errorText: cm-handle has an invalid character(s) in id + - cmHandle: my-cm-handle-01 + errorCode: "00" + errorText: Unknown error. + - cmHandle: my-cm-handle-02 + errorCode: "02" + errorText: cm-handle does not exists + - cmHandle: my-cm-handle-03 + errorCode: "03" + errorText: cm-handle has an invalid character(s) in id /v1/ch/cmHandles: get: tags: - - network-cm-proxy-inventory + - network-cm-proxy-inventory summary: "Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI\ \ data plugin, DMI model plugin)" description: Get all cm handle IDs for a registered DMI plugin operationId: getAllCmHandleIdsForRegisteredDmi parameters: - - name: dmi-plugin-identifier - in: query - description: dmi-plugin-identifier - required: true - schema: - type: string - example: my-dmi-plugin + - name: dmi-plugin-identifier + in: query + description: dmi-plugin-identifier + required: true + schema: + type: string + example: my-dmi-plugin responses: "200": description: OK @@ -152,7 +152,7 @@ paths: /v1/ch/searches: post: tags: - - network-cm-proxy-inventory + - network-cm-proxy-inventory summary: Query for CM Handle IDs description: "Query and get CMHandleIds for additional properties, public properties\ \ and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin)." @@ -230,14 +230,14 @@ components: removedCmHandles: type: array example: - - my-cm-handle1 - - my-cm-handle2 - - my-cm-handle3 + - my-cm-handle1 + - my-cm-handle2 + - my-cm-handle3 items: type: string RestInputCmHandle: required: - - cmHandle + - cmHandle type: object properties: cmHandle: @@ -327,6 +327,59 @@ components: moduleName: type: string example: my-module + responses: + NoContent: + description: No Content + content: {} + BadRequest: + 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 + Unauthorized: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 401 + message: Unauthorized error message + details: Unauthorized error details + Forbidden: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 403 + message: Forbidden error message + details: Forbidden error details + InternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 500 + message: Internal Server Error + details: Internal Server Error occurred + parameters: + dmiPluginIdentifierInQuery: + name: dmi-plugin-identifier + in: query + description: dmi-plugin-identifier + required: true + schema: + type: string + example: my-dmi-plugin securitySchemes: basicAuth: type: http diff --git a/docs/api/swagger/ncmp/openapi.yaml b/docs/api/swagger/ncmp/openapi.yaml index 52379f4add..5cc443b062 100644 --- a/docs/api/swagger/ncmp/openapi.yaml +++ b/docs/api/swagger/ncmp/openapi.yaml @@ -4,89 +4,89 @@ info: description: NCMP to CPS Proxy API version: "1.0" servers: - - url: /ncmp +- url: /ncmp security: - - basicAuth: [] +- basicAuth: [] paths: /v1/ch/{cm-handle}/data/ds/{datastore-name}: get: tags: - - network-cm-proxy + - network-cm-proxy summary: Get resource data for cm handle description: Get resource data for given cm handle operationId: getResourceDataForCmHandle parameters: - - name: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - name: resourceIdentifier - 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 - 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)\ + required: true + schema: + type: string + example: my-cm-handle + - name: resourceIdentifier + 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 + 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 - 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: topic parameter in query. - required: false - allowReserved: true - schema: - type: string - examples: - sample 1: - value: - topic: my-topic-name - - name: include-descendants - in: query - description: Determines if descendants are included in response - required: false - schema: - type: boolean - default: false + required: false + allowReserved: true + schema: + type: string + 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: topic parameter in query. + required: false + allowReserved: true + schema: + type: string + examples: + sample 1: + value: + topic: my-topic-name + - name: include-descendants + in: query + description: Determines if descendants are included in response + required: false + schema: + type: boolean + default: false responses: "200": description: OK @@ -150,55 +150,55 @@ paths: body: Bad Request put: tags: - - network-cm-proxy + - network-cm-proxy 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: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - name: resourceIdentifier - 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 - 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,\ + required: true + schema: + type: string + example: my-cm-handle + - name: resourceIdentifier + 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 + 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 - example: application/yang-data+json - default: application/json + required: false + schema: + type: string + example: application/yang-data+json + default: application/json requestBody: content: application/json: @@ -274,54 +274,54 @@ paths: body: Bad Request post: tags: - - network-cm-proxy + - 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: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - name: resourceIdentifier - 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 - 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,\ + required: true + schema: + type: string + example: my-cm-handle + - name: resourceIdentifier + 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 + 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 - example: application/yang-data+json - default: application/json + required: false + schema: + type: string + example: application/yang-data+json + default: application/json requestBody: content: application/json: @@ -394,54 +394,54 @@ paths: body: Bad Request delete: tags: - - network-cm-proxy + - network-cm-proxy summary: Delete resource data description: Delete resource data from pass-through running for a given cm handle operationId: deleteResourceDataRunningForCmHandle parameters: - - name: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - name: resourceIdentifier - 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 - 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,\ + required: true + schema: + type: string + example: my-cm-handle + - name: resourceIdentifier + 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 + 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 - example: application/yang-data+json - default: application/json + required: false + schema: + type: string + example: application/yang-data+json + default: application/json responses: "204": description: No Content @@ -509,55 +509,55 @@ paths: body: Bad Request patch: tags: - - network-cm-proxy + - network-cm-proxy 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: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - name: resourceIdentifier - 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 - 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,\ + required: true + schema: + type: string + example: my-cm-handle + - name: resourceIdentifier + 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 + 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 - example: application/yang-data+json - default: application/json + required: false + schema: + type: string + example: application/yang-data+json + default: application/json requestBody: content: '*/*': @@ -625,78 +625,215 @@ paths: dmi-response: http-code: 400 body: Bad Request + /v1/batch/data/ds/{datastore-name}: + post: + tags: + - network-cm-proxy + summary: Get resource data for batch of cm handle ids + 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. + operationId: getResourceDataForCmHandleBatch + parameters: + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - name: resourceIdentifier + 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 + 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 + 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: mandatory topic parameter in query. + required: true + allowReserved: true + schema: + type: string + examples: + sample 1: + value: + topic: my-topic-name + - name: include-descendants + in: query + description: Determines if descendants are included in response + required: false + schema: + type: boolean + default: false + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + "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 + "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 + "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}/data/ds/{datastore-name}/query: get: tags: - - network-cm-proxy + - network-cm-proxy summary: Query resource data for a given cm handle description: Query resource data for a given cm handle operationId: queryResourceDataForCmHandle parameters: - - name: datastore-name - in: path - description: The type of the requested data - required: true - schema: - type: string - example: ncmp-datastore:running - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + - 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 - example: my-cm-handle - - 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: options - in: query - description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\ + required: true + schema: + type: string + example: my-cm-handle + - 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: 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 - 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: topic parameter in query. - required: false - allowReserved: true - schema: - type: string - examples: - sample 1: - value: - topic: my-topic-name - - name: include-descendants - in: query - description: Determines if descendants are included in response - required: false - schema: - type: boolean - default: false + required: false + allowReserved: true + schema: + type: string + 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: topic parameter in query. + required: false + allowReserved: true + schema: + type: string + examples: + sample 1: + value: + topic: my-topic-name + - name: include-descendants + in: query + description: Determines if descendants are included in response + required: false + schema: + type: boolean + default: false responses: "200": description: OK @@ -761,20 +898,20 @@ paths: /v1/ch/{cm-handle}/modules: get: tags: - - network-cm-proxy + - 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 parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle + required: true + schema: + type: string + example: my-cm-handle responses: "200": description: OK @@ -827,21 +964,21 @@ paths: /v1/ch/{cm-handle}/modules/definitions: get: tags: - - network-cm-proxy + - network-cm-proxy summary: "Fetch all module definitions (name, revision, yang resource) for a\ \ given cm handle" description: "Fetch all module definitions (name, revision, yang resource) for\ \ a given cm handle" operationId: getModuleDefinitionsByCmHandleId parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle + required: true + schema: + type: string + example: my-cm-handle responses: "200": description: OK @@ -884,7 +1021,7 @@ paths: /v1/ch/searches: post: tags: - - network-cm-proxy + - network-cm-proxy summary: Execute cm handle search using the available conditions description: Execute cm handle query search and return a list of cm handle details. Any number of conditions can be applied. To be included in the result a cm-handle @@ -966,19 +1103,19 @@ paths: /v1/ch/{cm-handle}: get: tags: - - network-cm-proxy + - network-cm-proxy summary: Retrieve CM handle details description: Retrieve CM handle details and properties by cm handle id operationId: retrieveCmHandleDetailsById parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle + required: true + schema: + type: string + example: my-cm-handle responses: "200": description: OK @@ -1029,19 +1166,19 @@ paths: /v1/ch/{cm-handle}/properties: get: tags: - - network-cm-proxy + - network-cm-proxy summary: Get CM handle properties description: Get CM handle properties by cm handle id operationId: getCmHandlePublicPropertiesByCmHandleId parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle + required: true + schema: + type: string + example: my-cm-handle responses: "200": description: OK @@ -1092,7 +1229,7 @@ paths: /v1/ch/id-searches: post: tags: - - network-cm-proxy + - network-cm-proxy summary: Execute cm handle query upon a given set of query parameters description: Execute cm handle query search and return a list of cm handle ids. Any number of conditions can be applied. To be included in the result a cm-handle @@ -1184,19 +1321,19 @@ paths: /v1/ch/{cm-handle}/state: get: tags: - - network-cm-proxy + - network-cm-proxy summary: Get CM handle state description: Get CM handle state by cm handle id operationId: getCmHandleStateByCmHandleId parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle + required: true + schema: + type: string + example: my-cm-handle responses: "200": description: OK @@ -1247,28 +1384,28 @@ paths: /v1/ch/{cm-handle}/data-sync: put: tags: - - network-cm-proxy + - network-cm-proxy summary: Set the Data Sync Enabled Flag description: Set the data sync enabled flag to true or false for a specified Cm-Handle. This will in turn set the data sync state to UNSYNCHRONIZED and NONE_REQUESTED respectfully. operationId: setDataSyncEnabledFlagForCmHandle parameters: - - name: cm-handle - in: path - description: "The identifier for a network function, network element, subnetwork\ + - 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 - example: my-cm-handle - - name: dataSyncEnabled - in: query - description: Is used to enable or disable the data synchronization flag - required: true - schema: - type: boolean - example: true + required: true + schema: + type: string + example: my-cm-handle + - name: dataSyncEnabled + in: query + description: Is used to enable or disable the data synchronization flag + required: true + schema: + type: boolean + example: true responses: "200": description: OK @@ -1367,12 +1504,19 @@ components: example: my-module-name revision: type: string - example: 2020-09-15T00:00:00.000+00:00 + example: 2020-09-15 content: type: string - example: "module stores {\n yang-version 1.1;\n namespace \"org:onap:ccsdk:sample\"\ - ;\n prefix book-store;\n revision \"2020-09-15\" {\n description\n\ - \ \"Sample Model\";\n }\n}\n" + example: | + module stores { + yang-version 1.1; + namespace "org:onap:ccsdk:sample"; + prefix book-store; + revision "2020-09-15" { + description + "Sample Model"; + } + } CmHandleQueryParameters: title: Cm Handle query parameters for executing cm handle search type: object @@ -1489,6 +1633,201 @@ components: body: type: string example: Bad Request + responses: + BadRequest: + 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 + Unauthorized: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 401 + message: Unauthorized error message + details: Unauthorized error details + Forbidden: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 403 + message: Forbidden error message + details: Forbidden error details + InternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 500 + message: Internal Server Error + details: Internal Server Error occurred + BadGateway: + 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 + Ok: + description: OK + content: + application/json: + schema: + type: object + Created: + description: Created + content: {} + NoContent: + description: No Content + content: {} + NotFound: + 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 + parameters: + datastoreName: + name: datastore-name + in: path + description: The type of the requested data + required: true + schema: + type: string + example: ncmp-datastore:running + cmHandleInPath: + 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 + example: my-cm-handle + resourceIdentifierInQuery: + name: resourceIdentifier + 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 + examples: + sample 1: + value: + resourceIdentifier: \shops\bookstore + sample 2: + value: + resourceIdentifier: "\\shops\\bookstore\\categories[@code=1]" + sample 3: + value: + resourceIdentifier: "parent=shops,child=bookstore" + optionsParamInQuery: + 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 + examples: + sample 1: + value: + options: (depth=3) + sample 2: + value: + options: (fields=book) + sample 3: + value: + options: "(depth=2,fields=book/authors)" + topicParamInQuery: + name: topic + in: query + description: topic parameter in query. + required: false + allowReserved: true + schema: + type: string + examples: + sample 1: + value: + topic: my-topic-name + includeDescendantsOptionInQuery: + name: include-descendants + in: query + description: Determines if descendants are included in response + required: false + schema: + type: boolean + default: false + contentParamInHeader: + 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 + example: application/yang-data+json + default: application/json + requiredTopicParamInQuery: + name: topic + in: query + description: mandatory topic parameter in query. + required: true + allowReserved: true + schema: + type: string + examples: + sample 1: + value: + topic: my-topic-name + cpsPathInQuery: + 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]" + dataSyncEnabled: + name: dataSyncEnabled + in: query + description: Is used to enable or disable the data synchronization flag + required: true + schema: + type: boolean + example: true examples: dataSampleResponse: summary: Sample response @@ -1496,17 +1835,17 @@ components: value: bookstore: categories: - - code: "01" - books: - - authors: - - Iain M. Banks - - Ursula K. Le Guin - name: SciFi - - code: "02" - books: - - authors: - - Philip Pullman - name: kids + - 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 @@ -1514,17 +1853,17 @@ components: 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 + - 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 @@ -1532,86 +1871,86 @@ components: 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 + - 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 pubPropCmHandleQueryParameters: value: cmHandleQueryParameters: - - conditionName: hasAllProperties - conditionParameters: - - Color: yellow - - Shape: circle - - Size: small + - conditionName: hasAllProperties + conditionParameters: + - Color: yellow + - Shape: circle + - Size: small modulesCmHandleQueryParameters: value: cmHandleQueryParameters: - - conditionName: hasAllModules - conditionParameters: - - moduleName: my-module-1 - - moduleName: my-module-2 - - moduleName: my-module-3 + - conditionName: hasAllModules + conditionParameters: + - moduleName: my-module-1 + - moduleName: my-module-2 + - moduleName: my-module-3 allCmHandleQueryParameters: value: cmHandleQueryParameters: - - conditionName: hasAllModules - conditionParameters: - - moduleName: my-module-1 - - moduleName: my-module-2 - - moduleName: my-module-3 - - conditionName: hasAllProperties - conditionParameters: - - Color: yellow - - Shape: circle - - Size: small - - conditionName: cmHandleWithCpsPath - conditionParameters: - - cpsPath: "//state[@cm-handle-state='ADVISED']" + - conditionName: hasAllModules + conditionParameters: + - moduleName: my-module-1 + - moduleName: my-module-2 + - moduleName: my-module-3 + - conditionName: hasAllProperties + conditionParameters: + - Color: yellow + - Shape: circle + - Size: small + - conditionName: cmHandleWithCpsPath + conditionParameters: + - cpsPath: "//state[@cm-handle-state='ADVISED']" cpsPathCmHandleStateQueryParameters: value: cmHandleQueryParameters: - - conditionName: cmHandleWithCpsPath - conditionParameters: - - cpsPath: "//state[@cm-handle-state='LOCKED']" + - conditionName: cmHandleWithCpsPath + conditionParameters: + - cpsPath: "//state[@cm-handle-state='LOCKED']" cpsPathCmHandleDataSyncQueryParameters: value: cmHandleQueryParameters: - - conditionName: cmHandleWithCpsPath - conditionParameters: - - cpsPath: "//state[@data-sync-enabled='true']" + - conditionName: cmHandleWithCpsPath + conditionParameters: + - cpsPath: "//state[@data-sync-enabled='true']" securitySchemes: basicAuth: type: http -- cgit 1.2.3-korg