DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
lukegleeson | b208aeb | 2021-07-08 16:48:15 +0100 | [diff] [blame] | 2 | # Copyright (C) 2021 Nordix Foundation |
puthuparambil.aditya | 39450c5 | 2022-03-29 11:22:31 +0100 | [diff] [blame] | 3 | # Modifications Copyright (C) 2022 Bell Canada |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 4 | # ================================================================================ |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
lukegleeson | b208aeb | 2021-07-08 16:48:15 +0100 | [diff] [blame] | 10 | # |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | # SPDX-License-Identifier: Apache-2.0 |
| 18 | # ============LICENSE_END========================================================= |
| 19 | |
| 20 | openapi: 3.0.1 |
| 21 | info: |
| 22 | title: NCMP DMI Plugin |
| 23 | description: Adds Data Model Inventory Registry capability for ONAP |
| 24 | version: "1.0.0" |
| 25 | servers: |
Renu Kumari | 3aea57e | 2021-10-12 13:41:01 -0400 | [diff] [blame] | 26 | - url: /dmi |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 27 | tags: |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 28 | - name: dmi-plugin-internal |
| 29 | description: DMI plugin internal rest apis |
| 30 | - name: dmi-plugin |
| 31 | description: DMI plugin rest apis |
| 32 | |
| 33 | |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 34 | paths: |
tragait | 11e9f72 | 2021-08-27 15:01:27 +0100 | [diff] [blame] | 35 | /v1/ch/{cmHandle}/modules: |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 36 | post: |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 37 | tags: |
| 38 | - dmi-plugin |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 39 | summary: Get all modules for cm handle |
| 40 | description: Get all modules for given cm handle |
niamhcore | acc0f8b | 2021-10-06 09:49:12 +0100 | [diff] [blame] | 41 | operationId: getModuleReferences |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 42 | parameters: |
lukegleeson | 996152a | 2021-11-30 17:06:03 +0000 | [diff] [blame] | 43 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
tragait | 400b6c7 | 2021-09-22 10:50:15 +0100 | [diff] [blame] | 44 | requestBody: |
| 45 | description: Operational body |
| 46 | content: |
| 47 | application/json: |
| 48 | schema: |
niamhcore | acc0f8b | 2021-10-06 09:49:12 +0100 | [diff] [blame] | 49 | $ref: 'components.yml#/components/schemas/ModuleReferencesRequest' |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 50 | responses: |
| 51 | '200': |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 52 | description: OK |
| 53 | content: |
| 54 | application/json: |
| 55 | schema: |
niamhcore | 577efb0 | 2021-08-11 16:13:53 +0100 | [diff] [blame] | 56 | $ref: 'components.yml#/components/schemas/ModuleSet' |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 57 | '404': |
| 58 | $ref: 'components.yml#/components/responses/NotFound' |
| 59 | '500': |
| 60 | $ref: 'components.yml#/components/responses/ServerError' |
| 61 | |
tragait | 2270d76 | 2021-07-08 15:42:19 +0100 | [diff] [blame] | 62 | |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 63 | /v1/ch/{cmHandle}/moduleResources: |
| 64 | post: |
| 65 | description: Retrieve module resources for one or more modules |
| 66 | tags: |
| 67 | - dmi-plugin |
| 68 | summary: Retrieve module resources |
| 69 | operationId: retrieveModuleResources |
| 70 | parameters: |
| 71 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
| 72 | requestBody: |
| 73 | required: true |
| 74 | content: |
| 75 | application/json: |
| 76 | schema: |
niamhcore | acc0f8b | 2021-10-06 09:49:12 +0100 | [diff] [blame] | 77 | $ref: 'components.yml#/components/schemas/ModuleResourcesReadRequest' |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 78 | responses: |
| 79 | '200': |
niamhcore | 4f43188 | 2021-09-21 16:08:29 +0100 | [diff] [blame] | 80 | description: OK |
| 81 | content: |
| 82 | application/json: |
| 83 | schema: |
| 84 | $ref: 'components.yml#/components/schemas/YangResources' |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 85 | '404': |
| 86 | $ref: 'components.yml#/components/responses/NotFound' |
| 87 | '500': |
| 88 | $ref: 'components.yml#/components/responses/ServerError' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 89 | |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 90 | /v1/inventory/cmHandles: |
| 91 | post: |
| 92 | tags: |
| 93 | - dmi-plugin-internal |
| 94 | summary: register given list of cm handles (internal use only) |
| 95 | description: register given list of cm handles (internal use only) |
| 96 | x-api-audience: component-internal |
| 97 | operationId: registerCmHandles |
| 98 | requestBody: |
| 99 | description: list of cm handles |
| 100 | content: |
| 101 | application/json: |
| 102 | schema: |
| 103 | $ref: 'components.yml#/components/schemas/CmHandles' |
| 104 | required: true |
| 105 | responses: |
| 106 | '201': |
lukegleeson | 996152a | 2021-11-30 17:06:03 +0000 | [diff] [blame] | 107 | description: Created |
| 108 | content: |
| 109 | text/plain: |
| 110 | schema: |
| 111 | type: string |
| 112 | example: cm-handle registered successfully |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 113 | '400': |
| 114 | $ref: 'components.yml#/components/responses/BadRequest' |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 115 | '500': |
| 116 | $ref: 'components.yml#/components/responses/ServerError' |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 117 | |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame] | 118 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational: |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 119 | post: |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 120 | tags: |
| 121 | - dmi-plugin |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 122 | summary: Get resource data from passthrough-operational for cm handle |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 123 | description: Get resource data from passthrough-operational for cm handle. Will support read operations only. |
| 124 | operationId: dataAccessPassthroughOperational |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 125 | parameters: |
| 126 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame] | 127 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery' |
tragait | 907e378 | 2021-10-04 16:02:57 +0100 | [diff] [blame] | 128 | - $ref: 'components.yml#/components/parameters/optionsParamInQuery' |
mpriyank | 78e1d06 | 2022-04-08 15:12:22 +0530 | [diff] [blame] | 129 | - $ref: 'components.yml#/components/parameters/topicParamInQuery' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 130 | requestBody: |
| 131 | description: Operational body |
| 132 | content: |
| 133 | application/json: |
| 134 | schema: |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 135 | $ref: 'components.yml#/components/schemas/DataAccessRequest' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 136 | responses: |
| 137 | '200': |
lukegleeson | 996152a | 2021-11-30 17:06:03 +0000 | [diff] [blame] | 138 | description: OK |
| 139 | content: |
| 140 | application/json: |
| 141 | schema: |
| 142 | type: object |
| 143 | example: |
| 144 | - yangSource: my-yang-source |
| 145 | moduleName: my-module-name |
| 146 | revision: my-revision |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 147 | '400': |
| 148 | $ref: 'components.yml#/components/responses/BadRequest' |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 149 | '500': |
| 150 | $ref: 'components.yml#/components/responses/ServerError' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 151 | |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame] | 152 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running: |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 153 | post: |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 154 | tags: |
| 155 | - dmi-plugin |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 156 | summary: Get, Create or Update request for data passthrough-running for a cm-handle |
| 157 | description: Post request to Get, Create or to Update resource data for a cm-handle. Since all requests need to include additional information in a request body HTTP Post is used for all use cases and the actual operation is defined in the request body instead. |
| 158 | operationId: dataAccessPassthroughRunning |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 159 | parameters: |
| 160 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
niamhcore | 2fb3f66 | 2021-09-29 15:32:32 +0100 | [diff] [blame] | 161 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery' |
tragait | 907e378 | 2021-10-04 16:02:57 +0100 | [diff] [blame] | 162 | - $ref: 'components.yml#/components/parameters/optionsParamInQuery' |
mpriyank | 78e1d06 | 2022-04-08 15:12:22 +0530 | [diff] [blame] | 163 | - $ref: 'components.yml#/components/parameters/topicParamInQuery' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 164 | requestBody: |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 165 | content: |
| 166 | application/json: |
| 167 | schema: |
DylanB95EST | 5fe0dae | 2021-11-09 13:54:35 +0000 | [diff] [blame] | 168 | $ref: 'components.yml#/components/schemas/DataAccessRequest' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 169 | responses: |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 170 | '200': |
| 171 | description: OK |
| 172 | content: |
| 173 | application/json: |
| 174 | schema: |
| 175 | type: object |
| 176 | example: |
| 177 | - yangSource: my-yang-source |
| 178 | moduleName: my-module-name |
| 179 | revision: my-revision |
niamhcore | accefb1 | 2021-09-15 13:01:25 +0100 | [diff] [blame] | 180 | '201': |
lukegleeson | 996152a | 2021-11-30 17:06:03 +0000 | [diff] [blame] | 181 | description: Created |
| 182 | content: |
| 183 | text/plain: |
| 184 | schema: |
| 185 | type: string |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 186 | example: my-resource |
| 187 | '204': |
| 188 | $ref: 'components.yml#/components/responses/NoContent' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 189 | '400': |
| 190 | $ref: 'components.yml#/components/responses/BadRequest' |
puthuparambil.aditya | bdcccb5 | 2022-01-20 15:26:52 +0000 | [diff] [blame] | 191 | '500': |
| 192 | $ref: 'components.yml#/components/responses/ServerError' |