blob: 6e0e8ae686a60a7fe22666a628a22902ac88a27b [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001# ============LICENSE_START=======================================================
lukegleesonb208aeb2021-07-08 16:48:15 +01002# Copyright (C) 2021 Nordix Foundation
puthuparambil.aditya39450c52022-03-29 11:22:31 +01003# Modifications Copyright (C) 2022 Bell Canada
DylanB95ESTb5a23832021-06-02 19:45:46 +01004# ================================================================================
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
lukegleesonb208aeb2021-07-08 16:48:15 +010010#
DylanB95ESTb5a23832021-06-02 19:45:46 +010011# 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
20openapi: 3.0.1
21info:
22 title: NCMP DMI Plugin
23 description: Adds Data Model Inventory Registry capability for ONAP
24 version: "1.0.0"
25servers:
Renu Kumari3aea57e2021-10-12 13:41:01 -040026 - url: /dmi
DylanB95ESTb5a23832021-06-02 19:45:46 +010027tags:
tragait7c4a9aa2021-07-19 13:46:37 +010028 - name: dmi-plugin-internal
29 description: DMI plugin internal rest apis
30 - name: dmi-plugin
31 description: DMI plugin rest apis
32
33
DylanB95ESTb5a23832021-06-02 19:45:46 +010034paths:
tragait11e9f722021-08-27 15:01:27 +010035 /v1/ch/{cmHandle}/modules:
tragait7c4a9aa2021-07-19 13:46:37 +010036 post:
DylanB95ESTb5a23832021-06-02 19:45:46 +010037 tags:
38 - dmi-plugin
tragait7c4a9aa2021-07-19 13:46:37 +010039 summary: Get all modules for cm handle
40 description: Get all modules for given cm handle
niamhcoreacc0f8b2021-10-06 09:49:12 +010041 operationId: getModuleReferences
tragait7c4a9aa2021-07-19 13:46:37 +010042 parameters:
lukegleeson996152a2021-11-30 17:06:03 +000043 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
tragait400b6c72021-09-22 10:50:15 +010044 requestBody:
45 description: Operational body
46 content:
47 application/json:
48 schema:
niamhcoreacc0f8b2021-10-06 09:49:12 +010049 $ref: 'components.yml#/components/schemas/ModuleReferencesRequest'
DylanB95ESTb5a23832021-06-02 19:45:46 +010050 responses:
51 '200':
tragait7c4a9aa2021-07-19 13:46:37 +010052 description: OK
53 content:
54 application/json:
55 schema:
niamhcore577efb02021-08-11 16:13:53 +010056 $ref: 'components.yml#/components/schemas/ModuleSet'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000057 '404':
58 $ref: 'components.yml#/components/responses/NotFound'
59 '500':
60 $ref: 'components.yml#/components/responses/ServerError'
61
tragait2270d762021-07-08 15:42:19 +010062
niamhcore3139ece2021-07-30 16:25:16 +010063 /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:
niamhcoreacc0f8b2021-10-06 09:49:12 +010077 $ref: 'components.yml#/components/schemas/ModuleResourcesReadRequest'
niamhcore3139ece2021-07-30 16:25:16 +010078 responses:
79 '200':
niamhcore4f431882021-09-21 16:08:29 +010080 description: OK
81 content:
82 application/json:
83 schema:
84 $ref: 'components.yml#/components/schemas/YangResources'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000085 '404':
86 $ref: 'components.yml#/components/responses/NotFound'
87 '500':
88 $ref: 'components.yml#/components/responses/ServerError'
tragaite398be52021-08-06 17:01:31 +010089
DylanB95EST5fe0dae2021-11-09 13:54:35 +000090 /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':
lukegleeson996152a2021-11-30 17:06:03 +0000107 description: Created
108 content:
109 text/plain:
110 schema:
111 type: string
112 example: cm-handle registered successfully
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000113 '400':
114 $ref: 'components.yml#/components/responses/BadRequest'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000115 '500':
116 $ref: 'components.yml#/components/responses/ServerError'
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000117
niamhcore2fb3f662021-09-29 15:32:32 +0100118 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000119 post:
tragaite398be52021-08-06 17:01:31 +0100120 tags:
121 - dmi-plugin
tragaitf01d5672021-08-19 11:19:54 +0100122 summary: Get resource data from passthrough-operational for cm handle
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000123 description: Get resource data from passthrough-operational for cm handle. Will support read operations only.
124 operationId: dataAccessPassthroughOperational
tragaite398be52021-08-06 17:01:31 +0100125 parameters:
126 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
niamhcore2fb3f662021-09-29 15:32:32 +0100127 - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
tragait907e3782021-10-04 16:02:57 +0100128 - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
mpriyank78e1d062022-04-08 15:12:22 +0530129 - $ref: 'components.yml#/components/parameters/topicParamInQuery'
tragaitf01d5672021-08-19 11:19:54 +0100130 requestBody:
131 description: Operational body
132 content:
133 application/json:
134 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000135 $ref: 'components.yml#/components/schemas/DataAccessRequest'
tragaitf01d5672021-08-19 11:19:54 +0100136 responses:
137 '200':
lukegleeson996152a2021-11-30 17:06:03 +0000138 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
tragaitf01d5672021-08-19 11:19:54 +0100147 '400':
148 $ref: 'components.yml#/components/responses/BadRequest'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000149 '500':
150 $ref: 'components.yml#/components/responses/ServerError'
tragaitf01d5672021-08-19 11:19:54 +0100151
niamhcore2fb3f662021-09-29 15:32:32 +0100152 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000153 post:
tragaitf01d5672021-08-19 11:19:54 +0100154 tags:
155 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000156 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
tragaitf01d5672021-08-19 11:19:54 +0100159 parameters:
160 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
niamhcore2fb3f662021-09-29 15:32:32 +0100161 - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
tragait907e3782021-10-04 16:02:57 +0100162 - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
mpriyank78e1d062022-04-08 15:12:22 +0530163 - $ref: 'components.yml#/components/parameters/topicParamInQuery'
tragaite398be52021-08-06 17:01:31 +0100164 requestBody:
tragaite398be52021-08-06 17:01:31 +0100165 content:
166 application/json:
167 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000168 $ref: 'components.yml#/components/schemas/DataAccessRequest'
niamhcore79e41e02021-08-20 11:24:06 +0100169 responses:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000170 '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
niamhcoreaccefb12021-09-15 13:01:25 +0100180 '201':
lukegleeson996152a2021-11-30 17:06:03 +0000181 description: Created
182 content:
183 text/plain:
184 schema:
185 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000186 example: my-resource
187 '204':
188 $ref: 'components.yml#/components/responses/NoContent'
niamhcore79e41e02021-08-20 11:24:06 +0100189 '400':
190 $ref: 'components.yml#/components/responses/BadRequest'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000191 '500':
192 $ref: 'components.yml#/components/responses/ServerError'