blob: 101b93bf77e86750dcf266e0e1cbca4e9da10b2c [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)
mpriyank7b7297c2022-09-14 10:47:45 +0100198 - name: topic
199 in: query
200 description: topic name passed from client(NCMP).
201 required: false
202 allowReserved: true
203 schema:
204 type: string
205 examples:
206 sample1:
207 value: my-topic-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400208 requestBody:
209 description: Operational body
210 content:
211 application/json:
212 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000213 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400214 responses:
215 "200":
216 description: OK
217 content:
218 application/json:
219 schema:
220 type: object
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000221 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400222 - yangSource: my-yang-source
223 moduleName: my-module-name
224 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400225 "400":
226 description: Bad Request
227 content:
228 application/json:
229 schema:
230 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000231 example:
232 status: 400
233 message: Bad Request
234 details: The provided request is not valid
235 "500":
236 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400237 content:
238 application/json:
239 schema:
240 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000241 example:
242 status: 500
243 message: Internal Server Error
244 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400245 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000246 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400247 tags:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400248 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000249 summary: Get, Create or Update request for data passthrough-running for a cm-handle
250 description: Post request to Get, Create or to Update resource data for a cm-handle.
251 Since all requests need to include additional information in a request body
252 HTTP Post is used for all use cases and the actual operation is defined in
253 the request body instead.
254 operationId: dataAccessPassthroughRunning
Renu Kumari3aea57e2021-10-12 13:41:01 -0400255 parameters:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400256 - name: cmHandle
257 in: path
258 description: The identifier for a network function, network element, subnetwork,
259 or any other cm object by managed Network CM Proxy
260 required: true
261 schema:
262 type: string
263 example: my-cm-handle
264 - name: resourceIdentifier
265 in: query
266 description: Resource identifier to get/set the resource data
267 required: true
268 allowReserved: true
269 schema:
270 type: string
271 example: my-schema:my-node
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400272 - name: options
273 in: query
274 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
275 in parenthesis'()'.
276 required: false
277 allowReserved: true
278 schema:
279 type: string
280 examples:
281 sample1:
282 value:
283 options: (key1=value1,key2=value2)
284 sample2:
285 value:
286 options: (key1=value1,key2=value1/value2)
287 sample3:
288 value:
289 options: (key1=10,key2=value2,key3=val31,val32)
mpriyank7b7297c2022-09-14 10:47:45 +0100290 - name: topic
291 in: query
292 description: topic name passed from client(NCMP).
293 required: false
294 allowReserved: true
295 schema:
296 type: string
297 examples:
298 sample1:
299 value: my-topic-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400300 requestBody:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400301 content:
302 application/json:
303 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000304 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400305 responses:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000306 "200":
307 description: OK
308 content:
309 application/json:
310 schema:
311 type: object
312 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400313 - yangSource: my-yang-source
314 moduleName: my-module-name
315 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400316 "201":
317 description: Created
318 content:
319 text/plain:
320 schema:
321 type: string
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400322 example: my-resource
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000323 "204":
324 description: No Content
325 content: {}
Renu Kumari3aea57e2021-10-12 13:41:01 -0400326 "400":
327 description: Bad Request
328 content:
329 application/json:
330 schema:
331 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000332 example:
333 status: 400
334 message: Bad Request
335 details: The provided request is not valid
336 "500":
337 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400338 content:
339 application/json:
340 schema:
341 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000342 example:
343 status: 500
344 message: Internal Server Error
345 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400346components:
JosephKeenandfe45ff2022-10-26 15:17:59 +0100347 securitySchemes:
348 basicAuth:
349 type: http
350 scheme: basic
Renu Kumari3aea57e2021-10-12 13:41:01 -0400351 schemas:
352 ModuleReferencesRequest:
353 type: object
354 properties:
355 cmHandleProperties:
356 $ref: '#/components/schemas/cmHandleProperties'
357 cmHandleProperties:
358 type: object
359 additionalProperties:
360 type: string
361 example: '{"prop1":"value1","prop2":"value2"}'
362 ModuleSet:
363 type: object
364 properties:
365 schemas:
366 type: array
367 items:
368 $ref: '#/components/schemas/ModuleSet_schemas'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400369 ErrorMessage:
370 title: Error
371 type: object
372 properties:
373 status:
374 type: string
375 message:
376 type: string
377 details:
378 type: string
Renu Kumari3aea57e2021-10-12 13:41:01 -0400379 ModuleResourcesReadRequest:
380 type: object
381 properties:
382 data:
383 $ref: '#/components/schemas/ModuleResourcesReadRequest_data'
384 cmHandleProperties:
385 $ref: '#/components/schemas/cmHandleProperties'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400386 YangResources:
387 type: array
388 items:
389 $ref: '#/components/schemas/YangResource'
390 YangResource:
391 properties:
392 yangSource:
393 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000394 example: my-yang-source
Renu Kumari3aea57e2021-10-12 13:41:01 -0400395 moduleName:
396 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000397 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400398 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000399 type: string
400 example: my-revision
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000401 CmHandles:
402 type: object
403 properties:
404 cmHandles:
405 type: array
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000406 example:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400407 - cmHandleId1
408 - cmHandleId2
409 - cmHandleId3
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000410 items:
411 type: string
412 DataAccessRequest:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400413 type: object
414 properties:
415 operation:
416 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000417 example: read
Renu Kumari3aea57e2021-10-12 13:41:01 -0400418 enum:
Bruno Sakotoe830dce2022-03-15 11:57:45 -0400419 - read
420 - create
421 - update
422 - patch
423 - delete
Renu Kumari3aea57e2021-10-12 13:41:01 -0400424 dataType:
425 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000426 example: my-data-type
Renu Kumari3aea57e2021-10-12 13:41:01 -0400427 data:
428 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000429 example: my-data
Renu Kumari3aea57e2021-10-12 13:41:01 -0400430 cmHandleProperties:
431 $ref: '#/components/schemas/cmHandleProperties'
mpriyank78e1d062022-04-08 15:12:22 +0530432 requestId:
433 type: string
JosephKeenan2cd8b982022-05-23 15:43:05 +0100434 example: 3a9ce55c-e365-4dc9-8da3-a06f07cbc6d7
Renu Kumari3aea57e2021-10-12 13:41:01 -0400435 ModuleSet_schemas:
436 type: object
437 properties:
438 moduleName:
439 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000440 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400441 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000442 type: string
443 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400444 namespace:
445 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000446 example: my-namespace
Renu Kumari3aea57e2021-10-12 13:41:01 -0400447 ModuleResourcesReadRequest_data_modules:
448 type: object
449 properties:
450 name:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000451 type: string
452 example: my-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400453 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000454 type: string
455 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400456 ModuleResourcesReadRequest_data:
457 type: object
458 properties:
459 modules:
460 type: array
461 items:
462 $ref: '#/components/schemas/ModuleResourcesReadRequest_data_modules'
JosephKeenandfe45ff2022-10-26 15:17:59 +0100463
464security:
465 - basicAuth: []