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