Renu Kumari | 3aea57e | 2021-10-12 13:41:01 -0400 | [diff] [blame] | 1 | openapi: 3.0.1 |
| 2 | info: |
| 3 | title: NCMP DMI Plugin |
| 4 | description: Adds Data Model Inventory Registry capability for ONAP |
| 5 | version: 1.0.0 |
| 6 | servers: |
| 7 | - url: /dmi |
| 8 | tags: |
| 9 | - name: dmi-plugin-internal |
| 10 | description: DMI plugin internal rest apis |
| 11 | - name: dmi-plugin |
| 12 | description: DMI plugin rest apis |
| 13 | paths: |
| 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' |
| 61 | /v1/inventory/cmHandles: |
| 62 | post: |
| 63 | tags: |
| 64 | - dmi-plugin-internal |
| 65 | summary: register given list of cm handles (internal use only) |
| 66 | description: register given list of cm handles (internal use only) |
| 67 | operationId: registerCmHandles |
| 68 | requestBody: |
| 69 | description: list of cm handles |
| 70 | content: |
| 71 | application/json: |
| 72 | schema: |
| 73 | $ref: '#/components/schemas/CmHandles' |
| 74 | required: true |
| 75 | responses: |
| 76 | "201": |
| 77 | description: Created |
| 78 | content: |
| 79 | text/plain: |
| 80 | schema: |
| 81 | type: string |
| 82 | "400": |
| 83 | description: Bad Request |
| 84 | content: |
| 85 | application/json: |
| 86 | schema: |
| 87 | $ref: '#/components/schemas/ErrorMessage' |
| 88 | "401": |
| 89 | description: Unauthorized |
| 90 | content: |
| 91 | application/json: |
| 92 | schema: |
| 93 | $ref: '#/components/schemas/ErrorMessage' |
| 94 | "403": |
| 95 | description: Forbidden |
| 96 | content: |
| 97 | application/json: |
| 98 | schema: |
| 99 | $ref: '#/components/schemas/ErrorMessage' |
| 100 | x-api-audience: component-internal |
| 101 | /v1/ch/{cmHandle}/moduleResources: |
| 102 | post: |
| 103 | tags: |
| 104 | - dmi-plugin |
| 105 | summary: Retrieve module resources |
| 106 | description: Retrieve module resources for one or more modules |
| 107 | operationId: retrieveModuleResources |
| 108 | parameters: |
| 109 | - name: cmHandle |
| 110 | in: path |
| 111 | description: The identifier for a network function, network element, subnetwork, |
| 112 | or any other cm object by managed Network CM Proxy |
| 113 | required: true |
| 114 | schema: |
| 115 | type: string |
| 116 | requestBody: |
| 117 | content: |
| 118 | application/json: |
| 119 | schema: |
| 120 | $ref: '#/components/schemas/ModuleResourcesReadRequest' |
| 121 | required: true |
| 122 | responses: |
| 123 | "200": |
| 124 | description: OK |
| 125 | content: |
| 126 | application/json: |
| 127 | schema: |
| 128 | $ref: '#/components/schemas/YangResources' |
| 129 | "400": |
| 130 | description: Bad Request |
| 131 | content: |
| 132 | application/json: |
| 133 | schema: |
| 134 | $ref: '#/components/schemas/ErrorMessage' |
| 135 | "401": |
| 136 | description: Unauthorized |
| 137 | content: |
| 138 | application/json: |
| 139 | schema: |
| 140 | $ref: '#/components/schemas/ErrorMessage' |
| 141 | "403": |
| 142 | description: Forbidden |
| 143 | content: |
| 144 | application/json: |
| 145 | schema: |
| 146 | $ref: '#/components/schemas/ErrorMessage' |
| 147 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational: |
| 148 | put: |
| 149 | tags: |
| 150 | - dmi-plugin |
| 151 | summary: Get resource data from passthrough-operational for cm handle |
| 152 | description: Get resource data from passthrough-operational for cm handle |
| 153 | operationId: getResourceDataOperationalForCmHandle |
| 154 | parameters: |
| 155 | - name: cmHandle |
| 156 | in: path |
| 157 | description: The identifier for a network function, network element, subnetwork, |
| 158 | or any other cm object by managed Network CM Proxy |
| 159 | required: true |
| 160 | schema: |
| 161 | type: string |
| 162 | - name: resourceIdentifier |
| 163 | in: query |
| 164 | description: Resource identifier to get/set the resource data |
| 165 | required: true |
| 166 | allowReserved: true |
| 167 | schema: |
| 168 | type: string |
| 169 | - name: accept |
| 170 | in: header |
| 171 | description: Accept parameter for response, if accept parameter is null, that |
| 172 | means client can accept any format. |
| 173 | schema: |
| 174 | type: string |
| 175 | enum: |
| 176 | - application/json |
| 177 | - application/yang-data+json |
| 178 | - name: options |
| 179 | in: query |
| 180 | description: options parameter in query, it is mandatory to wrap key(s)=value(s) |
| 181 | in parenthesis'()'. |
| 182 | required: false |
| 183 | allowReserved: true |
| 184 | schema: |
| 185 | type: string |
| 186 | examples: |
| 187 | sample1: |
| 188 | value: |
| 189 | options: (key1=value1,key2=value2) |
| 190 | sample2: |
| 191 | value: |
| 192 | options: (key1=value1,key2=value1/value2) |
| 193 | sample3: |
| 194 | value: |
| 195 | options: (key1=10,key2=value2,key3=[val31,val32]) |
| 196 | requestBody: |
| 197 | description: Operational body |
| 198 | content: |
| 199 | application/json: |
| 200 | schema: |
| 201 | $ref: '#/components/schemas/DataAccessReadRequest' |
| 202 | responses: |
| 203 | "200": |
| 204 | description: OK |
| 205 | content: |
| 206 | application/json: |
| 207 | schema: |
| 208 | type: object |
| 209 | "400": |
| 210 | description: Bad Request |
| 211 | content: |
| 212 | application/json: |
| 213 | schema: |
| 214 | $ref: '#/components/schemas/ErrorMessage' |
| 215 | "401": |
| 216 | description: Unauthorized |
| 217 | content: |
| 218 | application/json: |
| 219 | schema: |
| 220 | $ref: '#/components/schemas/ErrorMessage' |
| 221 | "403": |
| 222 | description: Forbidden |
| 223 | content: |
| 224 | application/json: |
| 225 | schema: |
| 226 | $ref: '#/components/schemas/ErrorMessage' |
| 227 | /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running: |
| 228 | put: |
| 229 | tags: |
| 230 | - dmi-plugin |
| 231 | summary: Get resource data from passthrough-running for cm handle |
| 232 | description: Get resource data from passthrough-running for cm handle |
| 233 | operationId: getResourceDataPassthroughRunningForCmHandle |
| 234 | parameters: |
| 235 | - name: cmHandle |
| 236 | in: path |
| 237 | description: The identifier for a network function, network element, subnetwork, |
| 238 | or any other cm object by managed Network CM Proxy |
| 239 | required: true |
| 240 | schema: |
| 241 | type: string |
| 242 | - name: resourceIdentifier |
| 243 | in: query |
| 244 | description: Resource identifier to get/set the resource data |
| 245 | required: true |
| 246 | allowReserved: true |
| 247 | schema: |
| 248 | type: string |
| 249 | - name: accept |
| 250 | in: header |
| 251 | description: Accept parameter for response, if accept parameter is null, that |
| 252 | means client can accept any format. |
| 253 | schema: |
| 254 | type: string |
| 255 | enum: |
| 256 | - application/json |
| 257 | - application/yang-data+json |
| 258 | - name: options |
| 259 | in: query |
| 260 | description: options parameter in query, it is mandatory to wrap key(s)=value(s) |
| 261 | in parenthesis'()'. |
| 262 | required: false |
| 263 | allowReserved: true |
| 264 | schema: |
| 265 | type: string |
| 266 | examples: |
| 267 | sample1: |
| 268 | value: |
| 269 | options: (key1=value1,key2=value2) |
| 270 | sample2: |
| 271 | value: |
| 272 | options: (key1=value1,key2=value1/value2) |
| 273 | sample3: |
| 274 | value: |
| 275 | options: (key1=10,key2=value2,key3=[val31,val32]) |
| 276 | requestBody: |
| 277 | description: Operational body |
| 278 | content: |
| 279 | application/json: |
| 280 | schema: |
| 281 | $ref: '#/components/schemas/DataAccessReadRequest' |
| 282 | responses: |
| 283 | "200": |
| 284 | description: OK |
| 285 | content: |
| 286 | application/json: |
| 287 | schema: |
| 288 | type: object |
| 289 | "400": |
| 290 | description: Bad Request |
| 291 | content: |
| 292 | application/json: |
| 293 | schema: |
| 294 | $ref: '#/components/schemas/ErrorMessage' |
| 295 | "401": |
| 296 | description: Unauthorized |
| 297 | content: |
| 298 | application/json: |
| 299 | schema: |
| 300 | $ref: '#/components/schemas/ErrorMessage' |
| 301 | "403": |
| 302 | description: Forbidden |
| 303 | content: |
| 304 | application/json: |
| 305 | schema: |
| 306 | $ref: '#/components/schemas/ErrorMessage' |
| 307 | post: |
| 308 | tags: |
| 309 | - dmi-plugin |
| 310 | summary: Write data for a cmHandle |
| 311 | description: Write data for a cmHandle using passthrough-running |
| 312 | operationId: writeDataByPassthroughRunningForCmHandle |
| 313 | parameters: |
| 314 | - name: cmHandle |
| 315 | in: path |
| 316 | description: The identifier for a network function, network element, subnetwork, |
| 317 | or any other cm object by managed Network CM Proxy |
| 318 | required: true |
| 319 | schema: |
| 320 | type: string |
| 321 | - name: resourceIdentifier |
| 322 | in: query |
| 323 | description: Resource identifier to get/set the resource data |
| 324 | required: true |
| 325 | allowReserved: true |
| 326 | schema: |
| 327 | type: string |
| 328 | requestBody: |
| 329 | content: |
| 330 | application/json: |
| 331 | schema: |
| 332 | $ref: '#/components/schemas/DataAccessWriteRequest' |
| 333 | required: true |
| 334 | responses: |
| 335 | "201": |
| 336 | description: Created |
| 337 | content: |
| 338 | text/plain: |
| 339 | schema: |
| 340 | type: string |
| 341 | "400": |
| 342 | description: Bad Request |
| 343 | content: |
| 344 | application/json: |
| 345 | schema: |
| 346 | $ref: '#/components/schemas/ErrorMessage' |
| 347 | "401": |
| 348 | description: Unauthorized |
| 349 | content: |
| 350 | application/json: |
| 351 | schema: |
| 352 | $ref: '#/components/schemas/ErrorMessage' |
| 353 | "403": |
| 354 | description: Forbidden |
| 355 | content: |
| 356 | application/json: |
| 357 | schema: |
| 358 | $ref: '#/components/schemas/ErrorMessage' |
| 359 | components: |
| 360 | schemas: |
| 361 | ModuleReferencesRequest: |
| 362 | type: object |
| 363 | properties: |
| 364 | cmHandleProperties: |
| 365 | $ref: '#/components/schemas/cmHandleProperties' |
| 366 | cmHandleProperties: |
| 367 | type: object |
| 368 | additionalProperties: |
| 369 | type: string |
| 370 | example: '{"prop1":"value1","prop2":"value2"}' |
| 371 | ModuleSet: |
| 372 | type: object |
| 373 | properties: |
| 374 | schemas: |
| 375 | type: array |
| 376 | items: |
| 377 | $ref: '#/components/schemas/ModuleSet_schemas' |
| 378 | revision: |
| 379 | type: string |
| 380 | example: someRevision |
| 381 | ErrorMessage: |
| 382 | title: Error |
| 383 | type: object |
| 384 | properties: |
| 385 | status: |
| 386 | type: string |
| 387 | message: |
| 388 | type: string |
| 389 | details: |
| 390 | type: string |
| 391 | CmHandles: |
| 392 | type: object |
| 393 | properties: |
| 394 | cmHandles: |
| 395 | type: array |
| 396 | items: |
| 397 | type: string |
| 398 | ModuleResourcesReadRequest: |
| 399 | type: object |
| 400 | properties: |
| 401 | data: |
| 402 | $ref: '#/components/schemas/ModuleResourcesReadRequest_data' |
| 403 | cmHandleProperties: |
| 404 | $ref: '#/components/schemas/cmHandleProperties' |
| 405 | name: |
| 406 | type: string |
| 407 | example: someName |
| 408 | YangResources: |
| 409 | type: array |
| 410 | items: |
| 411 | $ref: '#/components/schemas/YangResource' |
| 412 | YangResource: |
| 413 | properties: |
| 414 | yangSource: |
| 415 | type: string |
| 416 | moduleName: |
| 417 | type: string |
| 418 | revision: |
| 419 | $ref: '#/components/schemas/revision' |
| 420 | DataAccessReadRequest: |
| 421 | type: object |
| 422 | properties: |
| 423 | operation: |
| 424 | type: string |
| 425 | enum: |
| 426 | - read |
| 427 | cmHandleProperties: |
| 428 | $ref: '#/components/schemas/cmHandleProperties' |
| 429 | DataAccessWriteRequest: |
| 430 | type: object |
| 431 | properties: |
| 432 | operation: |
| 433 | type: string |
| 434 | enum: |
| 435 | - create |
| 436 | dataType: |
| 437 | type: string |
| 438 | data: |
| 439 | type: string |
| 440 | cmHandleProperties: |
| 441 | $ref: '#/components/schemas/cmHandleProperties' |
| 442 | ModuleSet_schemas: |
| 443 | type: object |
| 444 | properties: |
| 445 | moduleName: |
| 446 | type: string |
| 447 | revision: |
| 448 | $ref: '#/components/schemas/revision' |
| 449 | namespace: |
| 450 | type: string |
| 451 | ModuleResourcesReadRequest_data_modules: |
| 452 | type: object |
| 453 | properties: |
| 454 | name: |
| 455 | $ref: '#/components/schemas/name' |
| 456 | revision: |
| 457 | $ref: '#/components/schemas/revision' |
| 458 | ModuleResourcesReadRequest_data: |
| 459 | type: object |
| 460 | properties: |
| 461 | modules: |
| 462 | type: array |
| 463 | items: |
| 464 | $ref: '#/components/schemas/ModuleResourcesReadRequest_data_modules' |