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: |
| 25 | - url: //localhost:8088/ |
| 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 |
| 40 | operationId: getModulesForCmHandle |
| 41 | parameters: |
| 42 | - name: cmHandle |
| 43 | in: path |
| 44 | description: The cm handle to fetch all the modules |
| 45 | required: true |
| 46 | schema: |
| 47 | type: string |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 48 | responses: |
| 49 | '200': |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 50 | description: OK |
| 51 | content: |
| 52 | application/json: |
| 53 | schema: |
niamhcore | 577efb0 | 2021-08-11 16:13:53 +0100 | [diff] [blame] | 54 | $ref: 'components.yml#/components/schemas/ModuleSet' |
tragait | 7c4a9aa | 2021-07-19 13:46:37 +0100 | [diff] [blame] | 55 | example: { |
niamhcore | 577efb0 | 2021-08-11 16:13:53 +0100 | [diff] [blame] | 56 | "schemas": [ |
| 57 | { |
| 58 | "moduleName": "example-identifier", |
| 59 | "revision": "example-version", |
| 60 | "namespace": "example-namespace" |
| 61 | } |
| 62 | ] |
| 63 | } |
DylanB95EST | b5a2383 | 2021-06-02 19:45:46 +0100 | [diff] [blame] | 64 | '400': |
| 65 | $ref: 'components.yml#/components/responses/BadRequest' |
| 66 | '401': |
| 67 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 68 | '403': |
tragait | 2270d76 | 2021-07-08 15:42:19 +0100 | [diff] [blame] | 69 | $ref: 'components.yml#/components/responses/Forbidden' |
| 70 | |
| 71 | /v1/inventory/cmHandles: |
| 72 | post: |
| 73 | tags: |
| 74 | - dmi-plugin-internal |
| 75 | summary: register given list of cm handles (internal use only) |
| 76 | description: register given list of cm handles (internal use only) |
| 77 | x-api-audience: component-internal |
| 78 | operationId: registerCmHandles |
| 79 | requestBody: |
| 80 | description: list of cm handles |
| 81 | content: |
| 82 | application/json: |
| 83 | schema: |
| 84 | $ref: 'components.yml#/components/schemas/CmHandles' |
| 85 | required: true |
| 86 | responses: |
| 87 | '201': |
| 88 | $ref: 'components.yml#/components/responses/Created' |
| 89 | '400': |
| 90 | $ref: 'components.yml#/components/responses/BadRequest' |
| 91 | '401': |
| 92 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 93 | '403': |
niamhcore | 3139ece | 2021-07-30 16:25:16 +0100 | [diff] [blame] | 94 | $ref: 'components.yml#/components/responses/Forbidden' |
| 95 | |
| 96 | /v1/ch/{cmHandle}/moduleResources: |
| 97 | post: |
| 98 | description: Retrieve module resources for one or more modules |
| 99 | tags: |
| 100 | - dmi-plugin |
| 101 | summary: Retrieve module resources |
| 102 | operationId: retrieveModuleResources |
| 103 | parameters: |
| 104 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
| 105 | requestBody: |
| 106 | required: true |
| 107 | content: |
| 108 | application/json: |
| 109 | schema: |
| 110 | $ref: 'components.yml#/components/schemas/ModuleRequestParent' |
| 111 | responses: |
| 112 | '200': |
| 113 | $ref: 'components.yml#/components/responses/Ok' |
| 114 | '400': |
| 115 | $ref: 'components.yml#/components/responses/BadRequest' |
| 116 | '401': |
| 117 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 118 | '403': |
| 119 | $ref: 'components.yml#/components/responses/Forbidden' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 120 | |
| 121 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational/{resourceIdentifier}: |
| 122 | put: |
| 123 | tags: |
| 124 | - dmi-plugin |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 125 | summary: Get resource data from passthrough-operational for cm handle |
| 126 | description: Get resource data from passthrough-operational for cm handle |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 127 | operationId: getResourceDataOperationalForCmHandle |
| 128 | parameters: |
| 129 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 130 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath' |
| 131 | - $ref: 'components.yml#/components/parameters/acceptParamInHeader' |
| 132 | - $ref: 'components.yml#/components/parameters/fieldsParamInQuery' |
| 133 | - $ref: 'components.yml#/components/parameters/depthParamInQuery' |
| 134 | requestBody: |
| 135 | description: Operational body |
| 136 | content: |
| 137 | application/json: |
| 138 | schema: |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 139 | $ref: 'components.yml#/components/schemas/DataAccessReadRequest' |
tragait | f01d567 | 2021-08-19 11:19:54 +0100 | [diff] [blame] | 140 | responses: |
| 141 | '200': |
| 142 | $ref: 'components.yml#/components/responses/Ok' |
| 143 | '400': |
| 144 | $ref: 'components.yml#/components/responses/BadRequest' |
| 145 | '401': |
| 146 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 147 | '403': |
| 148 | $ref: 'components.yml#/components/responses/Forbidden' |
| 149 | |
| 150 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running/{resourceIdentifier}: |
| 151 | put: |
| 152 | tags: |
| 153 | - dmi-plugin |
| 154 | summary: Get resource data from passthrough-running for cm handle |
| 155 | description: Get resource data from passthrough-running for cm handle |
| 156 | operationId: getResourceDataPassthroughRunningForCmHandle |
| 157 | parameters: |
| 158 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
| 159 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath' |
| 160 | - $ref: 'components.yml#/components/parameters/acceptParamInHeader' |
| 161 | - $ref: 'components.yml#/components/parameters/fieldsParamInQuery' |
| 162 | - $ref: 'components.yml#/components/parameters/depthParamInQuery' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 163 | requestBody: |
| 164 | description: Operational body |
| 165 | content: |
| 166 | application/json: |
| 167 | schema: |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 168 | $ref: 'components.yml#/components/schemas/DataAccessReadRequest' |
tragait | e398be5 | 2021-08-06 17:01:31 +0100 | [diff] [blame] | 169 | responses: |
| 170 | '200': |
| 171 | $ref: 'components.yml#/components/responses/Ok' |
| 172 | '400': |
| 173 | $ref: 'components.yml#/components/responses/BadRequest' |
| 174 | '401': |
| 175 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 176 | '403': |
| 177 | $ref: 'components.yml#/components/responses/Forbidden' |
niamhcore | 79e41e0 | 2021-08-20 11:24:06 +0100 | [diff] [blame] | 178 | |
| 179 | post: |
| 180 | description: Write data for a cmHandle using passthrough-running |
| 181 | tags: |
| 182 | - dmi-plugin |
| 183 | summary: Write data for a cmHandle |
| 184 | operationId: writeDataByPassthroughRunningForCmHandle |
| 185 | parameters: |
| 186 | - $ref: 'components.yml#/components/parameters/cmHandleInPath' |
| 187 | - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath' |
| 188 | requestBody: |
| 189 | required: true |
| 190 | content: |
| 191 | application/json: |
| 192 | schema: |
| 193 | $ref: 'components.yml#/components/schemas/DataAccessWriteRequest' |
| 194 | responses: |
| 195 | '200': |
| 196 | $ref: 'components.yml#/components/responses/Ok' |
| 197 | '400': |
| 198 | $ref: 'components.yml#/components/responses/BadRequest' |
| 199 | '401': |
| 200 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 201 | '403': |
| 202 | $ref: 'components.yml#/components/responses/Forbidden' |
| 203 | |