blob: 54676fe5149fc4092845364f351082f8cdb72477 [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:
7- url: /dmi
8tags:
9- name: dmi-plugin-internal
10 description: DMI plugin internal rest apis
11- name: dmi-plugin
12 description: DMI plugin rest apis
13paths:
14 /v1/ch/{cmHandle}/modules:
15 post:
16 tags:
17 - dmi-plugin
18 summary: Get all modules for cm handle
19 description: Get all modules for given cm handle
20 operationId: getModuleReferences
21 parameters:
22 - name: cmHandle
23 in: path
24 description: The cm handle to fetch all the modules
25 required: true
26 style: simple
27 explode: false
28 schema:
29 type: string
30 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'
43 "400":
44 description: Bad Request
45 content:
46 application/json:
47 schema:
48 $ref: '#/components/schemas/ErrorMessage'
49 "401":
50 description: Unauthorized
51 content:
52 application/json:
53 schema:
54 $ref: '#/components/schemas/ErrorMessage'
55 "403":
56 description: Forbidden
57 content:
58 application/json:
59 schema:
60 $ref: '#/components/schemas/ErrorMessage'
Renu Kumari3aea57e2021-10-12 13:41:01 -040061 /v1/ch/{cmHandle}/moduleResources:
62 post:
63 tags:
64 - dmi-plugin
65 summary: Retrieve module resources
66 description: Retrieve module resources for one or more modules
67 operationId: retrieveModuleResources
68 parameters:
69 - name: cmHandle
70 in: path
71 description: The identifier for a network function, network element, subnetwork,
72 or any other cm object by managed Network CM Proxy
73 required: true
74 schema:
75 type: string
76 requestBody:
77 content:
78 application/json:
79 schema:
80 $ref: '#/components/schemas/ModuleResourcesReadRequest'
81 required: true
82 responses:
83 "200":
84 description: OK
85 content:
86 application/json:
87 schema:
88 $ref: '#/components/schemas/YangResources'
89 "400":
90 description: Bad Request
91 content:
92 application/json:
93 schema:
94 $ref: '#/components/schemas/ErrorMessage'
95 "401":
96 description: Unauthorized
97 content:
98 application/json:
99 schema:
100 $ref: '#/components/schemas/ErrorMessage'
101 "403":
102 description: Forbidden
103 content:
104 application/json:
105 schema:
106 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000107 /v1/inventory/cmHandles:
108 post:
109 tags:
110 - dmi-plugin-internal
111 summary: register given list of cm handles (internal use only)
112 description: register given list of cm handles (internal use only)
113 operationId: registerCmHandles
114 requestBody:
115 description: list of cm handles
116 content:
117 application/json:
118 schema:
119 $ref: '#/components/schemas/CmHandles'
120 required: true
121 responses:
122 "201":
123 description: Created
124 content:
125 text/plain:
126 schema:
127 type: string
128 "400":
129 description: Bad Request
130 content:
131 application/json:
132 schema:
133 $ref: '#/components/schemas/ErrorMessage'
134 "401":
135 description: Unauthorized
136 content:
137 application/json:
138 schema:
139 $ref: '#/components/schemas/ErrorMessage'
140 "403":
141 description: Forbidden
142 content:
143 application/json:
144 schema:
145 $ref: '#/components/schemas/ErrorMessage'
146 x-api-audience: component-internal
Renu Kumari3aea57e2021-10-12 13:41:01 -0400147 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000148 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400149 tags:
150 - dmi-plugin
151 summary: Get resource data from passthrough-operational for cm handle
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000152 description: Get resource data from passthrough-operational for cm handle. Will
153 support read operations only.
154 operationId: dataAccessPassthroughOperational
Renu Kumari3aea57e2021-10-12 13:41:01 -0400155 parameters:
156 - name: cmHandle
157 in: path
158 description: The identifier for a network function, network element, subnetwork,
159 or any other cm object by managed Network CM Proxy
160 required: true
161 schema:
162 type: string
163 - name: resourceIdentifier
164 in: query
165 description: Resource identifier to get/set the resource data
166 required: true
167 allowReserved: true
168 schema:
169 type: string
170 - name: accept
171 in: header
172 description: Accept parameter for response, if accept parameter is null, that
173 means client can accept any format.
174 schema:
175 type: string
176 enum:
177 - application/json
178 - application/yang-data+json
179 - name: options
180 in: query
181 description: options parameter in query, it is mandatory to wrap key(s)=value(s)
182 in parenthesis'()'.
183 required: false
184 allowReserved: true
185 schema:
186 type: string
187 examples:
188 sample1:
189 value:
190 options: (key1=value1,key2=value2)
191 sample2:
192 value:
193 options: (key1=value1,key2=value1/value2)
194 sample3:
195 value:
196 options: (key1=10,key2=value2,key3=[val31,val32])
197 requestBody:
198 description: Operational body
199 content:
200 application/json:
201 schema:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000202 $ref: '#/components/schemas/DataAccessRequest'
Renu Kumari3aea57e2021-10-12 13:41:01 -0400203 responses:
204 "200":
205 description: OK
206 content:
207 application/json:
208 schema:
209 type: object
210 "400":
211 description: Bad Request
212 content:
213 application/json:
214 schema:
215 $ref: '#/components/schemas/ErrorMessage'
216 "401":
217 description: Unauthorized
218 content:
219 application/json:
220 schema:
221 $ref: '#/components/schemas/ErrorMessage'
222 "403":
223 description: Forbidden
224 content:
225 application/json:
226 schema:
227 $ref: '#/components/schemas/ErrorMessage'
228 /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000229 post:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400230 tags:
231 - dmi-plugin
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000232 summary: Get, Create or Update request for data passthrough-running for a cm-handle
233 description: Post request to Get, Create or to Update resource data for a cm-handle.
234 Since all requests need to include additional information in a request body
235 HTTP Post is used for all use cases and the actual operation is defined in
236 the request body instead.
237 operationId: dataAccessPassthroughRunning
Renu Kumari3aea57e2021-10-12 13:41:01 -0400238 parameters:
239 - name: cmHandle
240 in: path
241 description: The identifier for a network function, network element, subnetwork,
242 or any other cm object by managed Network CM Proxy
243 required: true
244 schema:
245 type: string
246 - name: resourceIdentifier
247 in: query
248 description: Resource identifier to get/set the resource data
249 required: true
250 allowReserved: true
251 schema:
252 type: string
253 - name: accept
254 in: header
255 description: Accept parameter for response, if accept parameter is null, that
256 means client can accept any format.
257 schema:
258 type: string
259 enum:
260 - application/json
261 - application/yang-data+json
262 - 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])
280 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:
286 "201":
287 description: Created
288 content:
289 text/plain:
290 schema:
291 type: string
292 "400":
293 description: Bad Request
294 content:
295 application/json:
296 schema:
297 $ref: '#/components/schemas/ErrorMessage'
298 "401":
299 description: Unauthorized
300 content:
301 application/json:
302 schema:
303 $ref: '#/components/schemas/ErrorMessage'
304 "403":
305 description: Forbidden
306 content:
307 application/json:
308 schema:
309 $ref: '#/components/schemas/ErrorMessage'
310components:
311 schemas:
312 ModuleReferencesRequest:
313 type: object
314 properties:
315 cmHandleProperties:
316 $ref: '#/components/schemas/cmHandleProperties'
317 cmHandleProperties:
318 type: object
319 additionalProperties:
320 type: string
321 example: '{"prop1":"value1","prop2":"value2"}'
322 ModuleSet:
323 type: object
324 properties:
325 schemas:
326 type: array
327 items:
328 $ref: '#/components/schemas/ModuleSet_schemas'
329 revision:
330 type: string
331 example: someRevision
332 ErrorMessage:
333 title: Error
334 type: object
335 properties:
336 status:
337 type: string
338 message:
339 type: string
340 details:
341 type: string
Renu Kumari3aea57e2021-10-12 13:41:01 -0400342 ModuleResourcesReadRequest:
343 type: object
344 properties:
345 data:
346 $ref: '#/components/schemas/ModuleResourcesReadRequest_data'
347 cmHandleProperties:
348 $ref: '#/components/schemas/cmHandleProperties'
349 name:
350 type: string
351 example: someName
352 YangResources:
353 type: array
354 items:
355 $ref: '#/components/schemas/YangResource'
356 YangResource:
357 properties:
358 yangSource:
359 type: string
360 moduleName:
361 type: string
362 revision:
363 $ref: '#/components/schemas/revision'
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000364 CmHandles:
365 type: object
366 properties:
367 cmHandles:
368 type: array
369 items:
370 type: string
371 DataAccessRequest:
Renu Kumari3aea57e2021-10-12 13:41:01 -0400372 type: object
373 properties:
374 operation:
375 type: string
376 enum:
377 - read
Renu Kumari3aea57e2021-10-12 13:41:01 -0400378 - create
DylanB95EST5fe0dae2021-11-09 13:54:35 +0000379 - update
380 - delete
Renu Kumari3aea57e2021-10-12 13:41:01 -0400381 dataType:
382 type: string
383 data:
384 type: string
385 cmHandleProperties:
386 $ref: '#/components/schemas/cmHandleProperties'
387 ModuleSet_schemas:
388 type: object
389 properties:
390 moduleName:
391 type: string
392 revision:
393 $ref: '#/components/schemas/revision'
394 namespace:
395 type: string
396 ModuleResourcesReadRequest_data_modules:
397 type: object
398 properties:
399 name:
400 $ref: '#/components/schemas/name'
401 revision:
402 $ref: '#/components/schemas/revision'
403 ModuleResourcesReadRequest_data:
404 type: object
405 properties:
406 modules:
407 type: array
408 items:
409 $ref: '#/components/schemas/ModuleResourcesReadRequest_data_modules'