blob: 716528b1ff5343f0ae5e06598dae2cfe90a41ce1 [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:
25 - url: //localhost:8088/
26tags:
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
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
DylanB95ESTb5a23832021-06-02 19:45:46 +010048 responses:
49 '200':
tragait7c4a9aa2021-07-19 13:46:37 +010050 description: OK
51 content:
52 application/json:
53 schema:
niamhcore577efb02021-08-11 16:13:53 +010054 $ref: 'components.yml#/components/schemas/ModuleSet'
tragait7c4a9aa2021-07-19 13:46:37 +010055 example: {
niamhcore577efb02021-08-11 16:13:53 +010056 "schemas": [
57 {
58 "moduleName": "example-identifier",
59 "revision": "example-version",
60 "namespace": "example-namespace"
61 }
62 ]
63 }
DylanB95ESTb5a23832021-06-02 19:45:46 +010064 '400':
65 $ref: 'components.yml#/components/responses/BadRequest'
66 '401':
67 $ref: 'components.yml#/components/responses/Unauthorized'
68 '403':
tragait2270d762021-07-08 15:42:19 +010069 $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':
niamhcore3139ece2021-07-30 16:25:16 +010094 $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:
niamhcore776c1452021-08-26 15:31:48 +0100110 $ref: 'components.yml#/components/schemas/DmiReadRequestBody'
niamhcore3139ece2021-07-30 16:25:16 +0100111 responses:
112 '200':
niamhcore4f431882021-09-21 16:08:29 +0100113 description: OK
114 content:
115 application/json:
116 schema:
117 $ref: 'components.yml#/components/schemas/YangResources'
niamhcore3139ece2021-07-30 16:25:16 +0100118 '400':
119 $ref: 'components.yml#/components/responses/BadRequest'
120 '401':
121 $ref: 'components.yml#/components/responses/Unauthorized'
122 '403':
123 $ref: 'components.yml#/components/responses/Forbidden'
tragaite398be52021-08-06 17:01:31 +0100124
125 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational/{resourceIdentifier}:
126 put:
127 tags:
128 - dmi-plugin
tragaitf01d5672021-08-19 11:19:54 +0100129 summary: Get resource data from passthrough-operational for cm handle
130 description: Get resource data from passthrough-operational for cm handle
tragaite398be52021-08-06 17:01:31 +0100131 operationId: getResourceDataOperationalForCmHandle
132 parameters:
133 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
tragaitf01d5672021-08-19 11:19:54 +0100134 - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath'
135 - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
136 - $ref: 'components.yml#/components/parameters/fieldsParamInQuery'
137 - $ref: 'components.yml#/components/parameters/depthParamInQuery'
138 requestBody:
139 description: Operational body
140 content:
141 application/json:
142 schema:
niamhcore79e41e02021-08-20 11:24:06 +0100143 $ref: 'components.yml#/components/schemas/DataAccessReadRequest'
tragaitf01d5672021-08-19 11:19:54 +0100144 responses:
145 '200':
146 $ref: 'components.yml#/components/responses/Ok'
147 '400':
148 $ref: 'components.yml#/components/responses/BadRequest'
149 '401':
150 $ref: 'components.yml#/components/responses/Unauthorized'
151 '403':
152 $ref: 'components.yml#/components/responses/Forbidden'
153
154 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running/{resourceIdentifier}:
155 put:
156 tags:
157 - dmi-plugin
158 summary: Get resource data from passthrough-running for cm handle
159 description: Get resource data from passthrough-running for cm handle
160 operationId: getResourceDataPassthroughRunningForCmHandle
161 parameters:
162 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
163 - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath'
164 - $ref: 'components.yml#/components/parameters/acceptParamInHeader'
165 - $ref: 'components.yml#/components/parameters/fieldsParamInQuery'
166 - $ref: 'components.yml#/components/parameters/depthParamInQuery'
tragaite398be52021-08-06 17:01:31 +0100167 requestBody:
168 description: Operational body
169 content:
170 application/json:
171 schema:
niamhcore79e41e02021-08-20 11:24:06 +0100172 $ref: 'components.yml#/components/schemas/DataAccessReadRequest'
tragaite398be52021-08-06 17:01:31 +0100173 responses:
174 '200':
175 $ref: 'components.yml#/components/responses/Ok'
176 '400':
177 $ref: 'components.yml#/components/responses/BadRequest'
178 '401':
179 $ref: 'components.yml#/components/responses/Unauthorized'
180 '403':
181 $ref: 'components.yml#/components/responses/Forbidden'
niamhcore79e41e02021-08-20 11:24:06 +0100182
183 post:
184 description: Write data for a cmHandle using passthrough-running
185 tags:
186 - dmi-plugin
187 summary: Write data for a cmHandle
188 operationId: writeDataByPassthroughRunningForCmHandle
189 parameters:
190 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
191 - $ref: 'components.yml#/components/parameters/resourceIdentifierInPath'
192 requestBody:
193 required: true
194 content:
195 application/json:
196 schema:
197 $ref: 'components.yml#/components/schemas/DataAccessWriteRequest'
198 responses:
niamhcoreaccefb12021-09-15 13:01:25 +0100199 '201':
200 $ref: 'components.yml#/components/responses/Created'
niamhcore79e41e02021-08-20 11:24:06 +0100201 '400':
202 $ref: 'components.yml#/components/responses/BadRequest'
203 '401':
204 $ref: 'components.yml#/components/responses/Unauthorized'
205 '403':
206 $ref: 'components.yml#/components/responses/Forbidden'
207