blob: a3b07c2438db16968d9fb6b58e2d82059fbd310d [file] [log] [blame]
Renu Kumari3aea57e2021-10-12 13:41:01 -04001openapi: 3.0.1
2info:
3 title: NCMP DMI Plugin
4 description: Adds Data Model Inventory Registry capability for ONAP
5 version: 1.0.0
6servers:
Bruno Sakotoe830dce2022-03-15 11:57:45 -04007- url: /dmi
Renu Kumari3aea57e2021-10-12 13:41:01 -04008tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -04009- name: dmi-plugin-internal
10 description: DMI plugin internal rest apis
11- name: dmi-plugin
12 description: DMI plugin rest apis
Renu Kumari3aea57e2021-10-12 13:41:01 -040013paths:
14 /v1/ch/{cmHandle}/modules:
15 post:
16 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -040017 - dmi-plugin
Renu Kumari3aea57e2021-10-12 13:41:01 -040018 summary: Get all modules for cm handle
19 description: Get all modules for given cm handle
20 operationId: getModuleReferences
21 parameters:
Bruno Sakotoe830dce2022-03-15 11:57:45 -040022 - name: cmHandle
23 in: path
24 description: The identifier for a network function, network element, subnetwork,
25 or any other cm object by managed Network CM Proxy
26 required: true
27 schema:
28 type: string
29 example: my-cm-handle
Renu Kumari3aea57e2021-10-12 13:41:01 -040030 requestBody:
31 description: Operational body
32 content:
33 application/json:
34 schema:
35 $ref: '#/components/schemas/ModuleReferencesRequest'
36 responses:
37 "200":
38 description: OK
39 content:
40 application/json:
41 schema:
42 $ref: '#/components/schemas/ModuleSet'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000043 "404":
44 description: The specified resource was not found
Renu Kumari3aea57e2021-10-12 13:41:01 -040045 content:
46 application/json:
47 schema:
48 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000049 example:
50 status: 404
51 message: Resource Not Found
52 details: The requested resource is not found
53 "500":
54 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -040055 content:
56 application/json:
57 schema:
58 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000059 example:
60 status: 500
61 message: Internal Server Error
62 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -040063 /v1/ch/{cmHandle}/moduleResources:
64 post:
65 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -040066 - dmi-plugin
Renu Kumari3aea57e2021-10-12 13:41:01 -040067 summary: Retrieve module resources
68 description: Retrieve module resources for one or more modules
69 operationId: retrieveModuleResources
70 parameters:
Bruno Sakotoe830dce2022-03-15 11:57:45 -040071 - name: cmHandle
72 in: path
73 description: The identifier for a network function, network element, subnetwork,
74 or any other cm object by managed Network CM Proxy
75 required: true
76 schema:
77 type: string
78 example: my-cm-handle
Renu Kumari3aea57e2021-10-12 13:41:01 -040079 requestBody:
80 content:
81 application/json:
82 schema:
83 $ref: '#/components/schemas/ModuleResourcesReadRequest'
84 required: true
85 responses:
86 "200":
87 description: OK
88 content:
89 application/json:
90 schema:
91 $ref: '#/components/schemas/YangResources'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000092 "404":
93 description: The specified resource was not found
Renu Kumari3aea57e2021-10-12 13:41:01 -040094 content:
95 application/json:
96 schema:
97 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000098 example:
99 status: 404
100 message: Resource Not Found
101 details: The requested resource is not found
102 "500":
103 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400104 content:
105 application/json:
106 schema:
107 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000108 example:
109 status: 500
110 message: Internal Server Error
111 details: Internal Server Error occured
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000112 /v1/inventory/cmHandles:
113 post:
114 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400115 - dmi-plugin-internal
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000116 summary: register given list of cm handles (internal use only)
117 description: register given list of cm handles (internal use only)
118 operationId: registerCmHandles
119 requestBody:
120 description: list of cm handles
121 content:
122 application/json:
123 schema:
124 $ref: '#/components/schemas/CmHandles'
125 required: true
126 responses:
127 "201":
128 description: Created
129 content:
130 text/plain:
131 schema:
132 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000133 example: cm-handle registered successfully
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000134 "400":
135 description: Bad Request
136 content:
137 application/json:
138 schema:
139 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000140 example:
141 status: 400
142 message: Bad Request
143 details: The provided request is not valid
144 "500":
145 description: Internal Server Error
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000146 content:
147 application/json:
148 schema:
149 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000150 example:
151 status: 500
152 message: Internal Server Error
153 details: Internal Server Error occured
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000154 x-api-audience: component-internal
Renu Kumari3aea57e2021-10-12 13:41:01 -0400155 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000156 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400157 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400158 - dmi-plugin
Renu Kumari3aea57e2021-10-12 13:41:01 -0400159 summary: Get resource data from passthrough-operational for cm handle
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000160 description: Get resource data from passthrough-operational for cm handle. Will
161 support read operations only.
162 operationId: dataAccessPassthroughOperational
Renu Kumari3aea57e2021-10-12 13:41:01 -0400163 parameters:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400164 - name: cmHandle
165 in: path
166 description: The identifier for a network function, network element, subnetwork,
167 or any other cm object by managed Network CM Proxy
168 required: true
169 schema:
170 type: string
171 example: my-cm-handle
172 - name: resourceIdentifier
173 in: query
174 description: Resource identifier to get/set the resource data
175 required: true
176 allowReserved: true
177 schema:
178 type: string
179 example: my-schema:my-node
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400180 - name: options
181 in: query
182 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
183 in parenthesis'()'.
184 required: false
185 allowReserved: true
186 schema:
187 type: string
188 examples:
189 sample1:
190 value:
191 options: (key1=value1,key2=value2)
192 sample2:
193 value:
194 options: (key1=value1,key2=value1/value2)
195 sample3:
196 value:
197 options: (key1=10,key2=value2,key3=val31,val32)
Renu Kumari3aea57e2021-10-12 13:41:01 -0400198 requestBody:
199 description: Operational body
200 content:
201 application/json:
202 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000203 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400204 responses:
205 "200":
206 description: OK
207 content:
208 application/json:
209 schema:
210 type: object
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000211 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400212 - yangSource: my-yang-source
213 moduleName: my-module-name
214 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400215 "400":
216 description: Bad Request
217 content:
218 application/json:
219 schema:
220 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000221 example:
222 status: 400
223 message: Bad Request
224 details: The provided request is not valid
225 "500":
226 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400227 content:
228 application/json:
229 schema:
230 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000231 example:
232 status: 500
233 message: Internal Server Error
234 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400235 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000236 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400237 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400238 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000239 summary: Get, Create or Update request for data passthrough-running for a cm-handle
240 description: Post request to Get, Create or to Update resource data for a cm-handle.
241 Since all requests need to include additional information in a request body
242 HTTP Post is used for all use cases and the actual operation is defined in
243 the request body instead.
244 operationId: dataAccessPassthroughRunning
Renu Kumari3aea57e2021-10-12 13:41:01 -0400245 parameters:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400246 - name: cmHandle
247 in: path
248 description: The identifier for a network function, network element, subnetwork,
249 or any other cm object by managed Network CM Proxy
250 required: true
251 schema:
252 type: string
253 example: my-cm-handle
254 - name: resourceIdentifier
255 in: query
256 description: Resource identifier to get/set the resource data
257 required: true
258 allowReserved: true
259 schema:
260 type: string
261 example: my-schema:my-node
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400262 - name: options
263 in: query
264 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
265 in parenthesis'()'.
266 required: false
267 allowReserved: true
268 schema:
269 type: string
270 examples:
271 sample1:
272 value:
273 options: (key1=value1,key2=value2)
274 sample2:
275 value:
276 options: (key1=value1,key2=value1/value2)
277 sample3:
278 value:
279 options: (key1=10,key2=value2,key3=val31,val32)
Renu Kumari3aea57e2021-10-12 13:41:01 -0400280 requestBody:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400281 content:
282 application/json:
283 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000284 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400285 responses:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000286 "200":
287 description: OK
288 content:
289 application/json:
290 schema:
291 type: object
292 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400293 - yangSource: my-yang-source
294 moduleName: my-module-name
295 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400296 "201":
297 description: Created
298 content:
299 text/plain:
300 schema:
301 type: string
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400302 example: my-resource
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000303 "204":
304 description: No Content
305 content: {}
Renu Kumari3aea57e2021-10-12 13:41:01 -0400306 "400":
307 description: Bad Request
308 content:
309 application/json:
310 schema:
311 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000312 example:
313 status: 400
314 message: Bad Request
315 details: The provided request is not valid
316 "500":
317 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400318 content:
319 application/json:
320 schema:
321 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000322 example:
323 status: 500
324 message: Internal Server Error
325 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400326components:
327 schemas:
328 ModuleReferencesRequest:
329 type: object
330 properties:
331 cmHandleProperties:
332 $ref: '#/components/schemas/cmHandleProperties'
333 cmHandleProperties:
334 type: object
335 additionalProperties:
336 type: string
337 example: '{"prop1":"value1","prop2":"value2"}'
338 ModuleSet:
339 type: object
340 properties:
341 schemas:
342 type: array
343 items:
344 $ref: '#/components/schemas/ModuleSet_schemas'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400345 ErrorMessage:
346 title: Error
347 type: object
348 properties:
349 status:
350 type: string
351 message:
352 type: string
353 details:
354 type: string
Renu Kumari3aea57e2021-10-12 13:41:01 -0400355 ModuleResourcesReadRequest:
356 type: object
357 properties:
358 data:
359 $ref: '#/components/schemas/ModuleResourcesReadRequest_data'
360 cmHandleProperties:
361 $ref: '#/components/schemas/cmHandleProperties'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400362 YangResources:
363 type: array
364 items:
365 $ref: '#/components/schemas/YangResource'
366 YangResource:
367 properties:
368 yangSource:
369 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000370 example: my-yang-source
Renu Kumari3aea57e2021-10-12 13:41:01 -0400371 moduleName:
372 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000373 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400374 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000375 type: string
376 example: my-revision
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000377 CmHandles:
378 type: object
379 properties:
380 cmHandles:
381 type: array
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000382 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400383 - cmHandleId1
384 - cmHandleId2
385 - cmHandleId3
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000386 items:
387 type: string
388 DataAccessRequest:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400389 type: object
390 properties:
391 operation:
392 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000393 example: read
Renu Kumari3aea57e2021-10-12 13:41:01 -0400394 enum:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400395 - read
396 - create
397 - update
398 - patch
399 - delete
Renu Kumari3aea57e2021-10-12 13:41:01 -0400400 dataType:
401 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000402 example: my-data-type
Renu Kumari3aea57e2021-10-12 13:41:01 -0400403 data:
404 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000405 example: my-data
Renu Kumari3aea57e2021-10-12 13:41:01 -0400406 cmHandleProperties:
407 $ref: '#/components/schemas/cmHandleProperties'
mpriyank78e1d062022-04-08 15:12:22 +0530408 requestId:
409 type: string
JosephKeenan2cd8b982022-05-23 15:43:05 +0100410 example: 3a9ce55c-e365-4dc9-8da3-a06f07cbc6d7
Renu Kumari3aea57e2021-10-12 13:41:01 -0400411 ModuleSet_schemas:
412 type: object
413 properties:
414 moduleName:
415 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000416 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400417 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000418 type: string
419 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400420 namespace:
421 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000422 example: my-namespace
Renu Kumari3aea57e2021-10-12 13:41:01 -0400423 ModuleResourcesReadRequest_data_modules:
424 type: object
425 properties:
426 name:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000427 type: string
428 example: my-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400429 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000430 type: string
431 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400432 ModuleResourcesReadRequest_data:
433 type: object
434 properties:
435 modules:
436 type: array
437 items:
438 $ref: '#/components/schemas/ModuleResourcesReadRequest_data_modules'