blob: 300557bd623194b8fa9df2ef44c3e95315c4d75a [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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +00007 - url: /dmi
Renu Kumari3aea57e2021-10-12 13:41:01 -04008tags:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +00009 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000017 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000022 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000066 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +000071 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000115 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000158 - 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:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000164 - 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
180 - name: accept
181 in: header
182 description: Accept parameter for response, if accept parameter is null, that
183 means client can accept any format.
184 schema:
185 type: string
186 enum:
187 - application/json
188 - application/yang-data+json
189 - name: options
190 in: query
191 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
192 in parenthesis'()'.
193 required: false
194 allowReserved: true
195 schema:
196 type: string
197 examples:
198 sample1:
199 value:
200 options: (key1=value1,key2=value2)
201 sample2:
202 value:
203 options: (key1=value1,key2=value1/value2)
204 sample3:
205 value:
206 options: (key1=10,key2=value2,key3=val31,val32)
Renu Kumari3aea57e2021-10-12 13:41:01 -0400207 requestBody:
208 description: Operational body
209 content:
210 application/json:
211 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000212 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400213 responses:
214 "200":
215 description: OK
216 content:
217 application/json:
218 schema:
219 type: object
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000220 example:
221 - yangSource: my-yang-source
222 moduleName: my-module-name
223 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400224 "400":
225 description: Bad Request
226 content:
227 application/json:
228 schema:
229 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000230 example:
231 status: 400
232 message: Bad Request
233 details: The provided request is not valid
234 "500":
235 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400236 content:
237 application/json:
238 schema:
239 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000240 example:
241 status: 500
242 message: Internal Server Error
243 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400244 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000245 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400246 tags:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000247 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000248 summary: Get, Create or Update request for data passthrough-running for a cm-handle
249 description: Post request to Get, Create or to Update resource data for a cm-handle.
250 Since all requests need to include additional information in a request body
251 HTTP Post is used for all use cases and the actual operation is defined in
252 the request body instead.
253 operationId: dataAccessPassthroughRunning
Renu Kumari3aea57e2021-10-12 13:41:01 -0400254 parameters:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000255 - name: cmHandle
256 in: path
257 description: The identifier for a network function, network element, subnetwork,
258 or any other cm object by managed Network CM Proxy
259 required: true
260 schema:
261 type: string
262 example: my-cm-handle
263 - name: resourceIdentifier
264 in: query
265 description: Resource identifier to get/set the resource data
266 required: true
267 allowReserved: true
268 schema:
269 type: string
270 example: my-schema:my-node
271 - name: accept
272 in: header
273 description: Accept parameter for response, if accept parameter is null, that
274 means client can accept any format.
275 schema:
276 type: string
277 enum:
278 - application/json
279 - application/yang-data+json
280 - name: options
281 in: query
282 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
283 in parenthesis'()'.
284 required: false
285 allowReserved: true
286 schema:
287 type: string
288 examples:
289 sample1:
290 value:
291 options: (key1=value1,key2=value2)
292 sample2:
293 value:
294 options: (key1=value1,key2=value1/value2)
295 sample3:
296 value:
297 options: (key1=10,key2=value2,key3=val31,val32)
Renu Kumari3aea57e2021-10-12 13:41:01 -0400298 requestBody:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400299 content:
300 application/json:
301 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000302 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400303 responses:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000304 "200":
305 description: OK
306 content:
307 application/json:
308 schema:
309 type: object
310 example:
311 - yangSource: my-yang-source
312 moduleName: my-module-name
313 revision: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400314 "201":
315 description: Created
316 content:
317 text/plain:
318 schema:
319 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000320 example: cm-handle registered successfully
321 "204":
322 description: No Content
323 content: {}
Renu Kumari3aea57e2021-10-12 13:41:01 -0400324 "400":
325 description: Bad Request
326 content:
327 application/json:
328 schema:
329 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000330 example:
331 status: 400
332 message: Bad Request
333 details: The provided request is not valid
334 "500":
335 description: Internal Server Error
Renu Kumari3aea57e2021-10-12 13:41:01 -0400336 content:
337 application/json:
338 schema:
339 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000340 example:
341 status: 500
342 message: Internal Server Error
343 details: Internal Server Error occured
Renu Kumari3aea57e2021-10-12 13:41:01 -0400344components:
345 schemas:
346 ModuleReferencesRequest:
347 type: object
348 properties:
349 cmHandleProperties:
350 $ref: '#/components/schemas/cmHandleProperties'
351 cmHandleProperties:
352 type: object
353 additionalProperties:
354 type: string
355 example: '{"prop1":"value1","prop2":"value2"}'
356 ModuleSet:
357 type: object
358 properties:
359 schemas:
360 type: array
361 items:
362 $ref: '#/components/schemas/ModuleSet_schemas'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400363 ErrorMessage:
364 title: Error
365 type: object
366 properties:
367 status:
368 type: string
369 message:
370 type: string
371 details:
372 type: string
Renu Kumari3aea57e2021-10-12 13:41:01 -0400373 ModuleResourcesReadRequest:
374 type: object
375 properties:
376 data:
377 $ref: '#/components/schemas/ModuleResourcesReadRequest_data'
378 cmHandleProperties:
379 $ref: '#/components/schemas/cmHandleProperties'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400380 YangResources:
381 type: array
382 items:
383 $ref: '#/components/schemas/YangResource'
384 YangResource:
385 properties:
386 yangSource:
387 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000388 example: my-yang-source
Renu Kumari3aea57e2021-10-12 13:41:01 -0400389 moduleName:
390 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000391 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400392 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000393 type: string
394 example: my-revision
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000395 CmHandles:
396 type: object
397 properties:
398 cmHandles:
399 type: array
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000400 example:
401 - cmHandleId1
402 - cmHandleId2
403 - cmHandleId3
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000404 items:
405 type: string
406 DataAccessRequest:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400407 type: object
408 properties:
409 operation:
410 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000411 example: read
Renu Kumari3aea57e2021-10-12 13:41:01 -0400412 enum:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000413 - read
414 - create
415 - update
416 - delete
Renu Kumari3aea57e2021-10-12 13:41:01 -0400417 dataType:
418 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000419 example: my-data-type
Renu Kumari3aea57e2021-10-12 13:41:01 -0400420 data:
421 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000422 example: my-data
Renu Kumari3aea57e2021-10-12 13:41:01 -0400423 cmHandleProperties:
424 $ref: '#/components/schemas/cmHandleProperties'
425 ModuleSet_schemas:
426 type: object
427 properties:
428 moduleName:
429 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000430 example: my-module-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400431 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000432 type: string
433 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400434 namespace:
435 type: string
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000436 example: my-namespace
Renu Kumari3aea57e2021-10-12 13:41:01 -0400437 ModuleResourcesReadRequest_data_modules:
438 type: object
439 properties:
440 name:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000441 type: string
442 example: my-name
Renu Kumari3aea57e2021-10-12 13:41:01 -0400443 revision:
puthuparambil.adityabdcccb52022-01-20 15:26:52 +0000444 type: string
445 example: my-revision
Renu Kumari3aea57e2021-10-12 13:41:01 -0400446 ModuleResourcesReadRequest_data:
447 type: object
448 properties:
449 modules:
450 type: array
451 items:
452 $ref: '#/components/schemas/ModuleResourcesReadRequest_data_modules'