blob: 6605a2df2694e0b2d033d334fc99f6356e9579d2 [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001# ============LICENSE_START=======================================================
lukegleesonb208aeb2021-07-08 16:48:15 +01002# Copyright (C) 2021 Nordix Foundation
DylanB95ESTb5a23832021-06-02 19:45:46 +01003# ================================================================================
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
lukegleesonb208aeb2021-07-08 16:48:15 +01009#
DylanB95ESTb5a23832021-06-02 19:45:46 +010010# 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
19openapi: 3.0.1
20info:
21 title: NCMP DMI Plugin
22 description: Adds Data Model Inventory Registry capability for ONAP
23 version: "1.0.0"
24servers:
Renu Kumari3aea57e2021-10-12 13:41:01 -040025 - url: /dmi
DylanB95ESTb5a23832021-06-02 19:45:46 +010026tags:
tragait7c4a9aa2021-07-19 13:46:37 +010027 - name: dmi-plugin-internal
28 description: DMI plugin internal rest apis
29 - name: dmi-plugin
30 description: DMI plugin rest apis
31
32
DylanB95ESTb5a23832021-06-02 19:45:46 +010033paths:
tragait11e9f722021-08-27 15:01:27 +010034 /v1/ch/{cmHandle}/modules:
tragait7c4a9aa2021-07-19 13:46:37 +010035 post:
DylanB95ESTb5a23832021-06-02 19:45:46 +010036 tags:
37 - dmi-plugin
tragait7c4a9aa2021-07-19 13:46:37 +010038 summary: Get all modules for cm handle
39 description: Get all modules for given cm handle
niamhcoreacc0f8b2021-10-06 09:49:12 +010040 operationId: getModuleReferences
tragait7c4a9aa2021-07-19 13:46:37 +010041 parameters:
lukegleeson996152a2021-11-30 17:06:03 +000042 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
tragait400b6c72021-09-22 10:50:15 +010043 requestBody:
44 description: Operational body
45 content:
46 application/json:
47 schema:
niamhcoreacc0f8b2021-10-06 09:49:12 +010048 $ref: 'components.yml#/components/schemas/ModuleReferencesRequest'
DylanB95ESTb5a23832021-06-02 19:45:46 +010049 responses:
50 '200':
tragait7c4a9aa2021-07-19 13:46:37 +010051 description: OK
52 content:
53 application/json:
54 schema:
niamhcore577efb02021-08-11 16:13:53 +010055 $ref: 'components.yml#/components/schemas/ModuleSet'
DylanB95ESTb5a23832021-06-02 19:45:46 +010056 '400':
57 $ref: 'components.yml#/components/responses/BadRequest'
58 '401':
59 $ref: 'components.yml#/components/responses/Unauthorized'
60 '403':
tragait2270d762021-07-08 15:42:19 +010061 $ref: 'components.yml#/components/responses/Forbidden'
62
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'
niamhcore3139ece2021-07-30 16:25:16 +010085 '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'
tragaite398be52021-08-06 17:01:31 +010091
DylanB95EST5fe0dae2021-11-09 13:54:35 +000092 /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':
lukegleeson996152a2021-11-30 17:06:03 +0000109 description: Created
110 content:
111 text/plain:
112 schema:
113 type: string
114 example: cm-handle registered successfully
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000115 '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
niamhcore2fb3f662021-09-29 15:32:32 +0100122 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000123 post:
tragaite398be52021-08-06 17:01:31 +0100124 tags:
125 - dmi-plugin
tragaitf01d5672021-08-19 11:19:54 +0100126 summary: Get resource data from passthrough-operational for cm handle
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000127 description: Get resource data from passthrough-operational for cm handle. Will support read operations only.
128 operationId: dataAccessPassthroughOperational
tragaite398be52021-08-06 17:01:31 +0100129 parameters:
130 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
niamhcore2fb3f662021-09-29 15:32:32 +0100131 - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
tragaitf01d5672021-08-19 11:19:54 +0100132 - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
tragait907e3782021-10-04 16:02:57 +0100133 - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
tragaitf01d5672021-08-19 11:19:54 +0100134 requestBody:
135 description: Operational body
136 content:
137 application/json:
138 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000139 $ref: 'components.yml#/components/schemas/DataAccessRequest'
tragaitf01d5672021-08-19 11:19:54 +0100140 responses:
141 '200':
lukegleeson996152a2021-11-30 17:06:03 +0000142 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
tragaitf01d5672021-08-19 11:19:54 +0100151 '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
niamhcore2fb3f662021-09-29 15:32:32 +0100158 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000159 post:
tragaitf01d5672021-08-19 11:19:54 +0100160 tags:
161 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000162 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
tragaitf01d5672021-08-19 11:19:54 +0100165 parameters:
166 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
niamhcore2fb3f662021-09-29 15:32:32 +0100167 - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
tragaitf01d5672021-08-19 11:19:54 +0100168 - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
tragait907e3782021-10-04 16:02:57 +0100169 - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
tragaite398be52021-08-06 17:01:31 +0100170 requestBody:
tragaite398be52021-08-06 17:01:31 +0100171 content:
172 application/json:
173 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000174 $ref: 'components.yml#/components/schemas/DataAccessRequest'
niamhcore79e41e02021-08-20 11:24:06 +0100175 responses:
niamhcoreaccefb12021-09-15 13:01:25 +0100176 '201':
lukegleeson996152a2021-11-30 17:06:03 +0000177 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
niamhcore79e41e02021-08-20 11:24:06 +0100191 '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'