niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 1 | openapi: 3.0.1 |
| 2 | info: |
| 3 | title: NCMP Inventory API |
| 4 | description: NCMP Inventory API |
| 5 | version: "1.0" |
| 6 | servers: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 7 | - url: /ncmpInventory |
seanbeirne | 16e2358 | 2023-01-26 09:21:44 +0000 | [diff] [blame] | 8 | security: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 9 | - basicAuth: [] |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 10 | paths: |
| 11 | /v1/ch: |
| 12 | post: |
| 13 | tags: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 14 | - network-cm-proxy-inventory |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 15 | summary: DMI notifies NCMP of new CM Handles |
| 16 | description: "Register a DMI Plugin with any new, updated or removed CM Handles." |
| 17 | operationId: updateDmiPluginRegistration |
| 18 | requestBody: |
| 19 | content: |
| 20 | application/json: |
| 21 | schema: |
| 22 | $ref: '#/components/schemas/RestDmiPluginRegistration' |
| 23 | required: true |
| 24 | responses: |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 25 | "200": |
mpriyank | 80dee97 | 2022-02-23 15:17:23 +0530 | [diff] [blame] | 26 | description: No Content |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 27 | content: {} |
| 28 | "400": |
| 29 | description: Bad Request |
| 30 | content: |
| 31 | application/json: |
| 32 | schema: |
| 33 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 34 | example: |
| 35 | status: 400 BAD_REQUEST |
| 36 | message: Bad request error message |
| 37 | details: Bad request error details |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 38 | "401": |
| 39 | description: Unauthorized |
| 40 | content: |
| 41 | application/json: |
| 42 | schema: |
| 43 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 44 | example: |
| 45 | status: 401 |
| 46 | message: Unauthorized error message |
| 47 | details: Unauthorized error details |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 48 | "403": |
| 49 | description: Forbidden |
| 50 | content: |
| 51 | application/json: |
| 52 | schema: |
| 53 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 54 | example: |
| 55 | status: 403 |
| 56 | message: Forbidden error message |
| 57 | details: Forbidden error details |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 58 | "500": |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 59 | description: Partial or Complete failure. The error details are provided |
| 60 | in the response body and all supported error codes are documented in the |
| 61 | example. |
| 62 | content: |
| 63 | application/json: |
| 64 | schema: |
| 65 | $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse' |
| 66 | example: |
| 67 | failedCreatedCmHandles: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 68 | - cmHandle: my-cm-handle-01 |
| 69 | errorCode: "00" |
| 70 | errorText: Unknown error. <error-details> |
| 71 | - cmHandle: my-cm-handle-02 |
| 72 | errorCode: "01" |
| 73 | errorText: cm-handle already exists |
| 74 | - cmHandle: my-cm-handle-03 |
| 75 | errorCode: "03" |
| 76 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 77 | failedUpdatedCmHandles: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 78 | - cmHandle: my-cm-handle-01 |
| 79 | errorCode: "00" |
| 80 | errorText: Unknown error. <error-details> |
| 81 | - cmHandle: my-cm-handle-02 |
| 82 | errorCode: "02" |
| 83 | errorText: cm-handle does not exist |
| 84 | - cmHandle: my-cm-handle-03 |
| 85 | errorCode: "03" |
| 86 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 87 | failedRemovedCmHandles: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 88 | - cmHandle: my-cm-handle-01 |
| 89 | errorCode: "00" |
| 90 | errorText: Unknown error. <error-details> |
| 91 | - cmHandle: my-cm-handle-02 |
| 92 | errorCode: "02" |
| 93 | errorText: cm-handle does not exists |
| 94 | - cmHandle: my-cm-handle-03 |
| 95 | errorCode: "03" |
| 96 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 97 | /v1/ch/cmHandles: |
| 98 | get: |
| 99 | tags: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 100 | - network-cm-proxy-inventory |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 101 | summary: "Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI\ |
| 102 | \ data plugin, DMI model plugin)" |
| 103 | description: Get all cm handle IDs for a registered DMI plugin |
| 104 | operationId: getAllCmHandleIdsForRegisteredDmi |
| 105 | parameters: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 106 | - name: dmi-plugin-identifier |
| 107 | in: query |
| 108 | description: dmi-plugin-identifier |
| 109 | required: true |
| 110 | schema: |
| 111 | type: string |
| 112 | example: my-dmi-plugin |
seanbeirne | 16e2358 | 2023-01-26 09:21:44 +0000 | [diff] [blame] | 113 | responses: |
| 114 | "200": |
| 115 | description: OK |
| 116 | content: |
| 117 | application/json: |
| 118 | schema: |
| 119 | type: array |
| 120 | items: |
| 121 | type: string |
| 122 | "401": |
| 123 | description: Unauthorized |
| 124 | content: |
| 125 | application/json: |
| 126 | schema: |
| 127 | $ref: '#/components/schemas/ErrorMessage' |
| 128 | example: |
| 129 | status: 401 |
| 130 | message: Unauthorized error message |
| 131 | details: Unauthorized error details |
| 132 | "403": |
| 133 | description: Forbidden |
| 134 | content: |
| 135 | application/json: |
| 136 | schema: |
| 137 | $ref: '#/components/schemas/ErrorMessage' |
| 138 | example: |
| 139 | status: 403 |
| 140 | message: Forbidden error message |
| 141 | details: Forbidden error details |
| 142 | "500": |
| 143 | description: Internal Server Error |
| 144 | content: |
| 145 | application/json: |
| 146 | schema: |
| 147 | $ref: '#/components/schemas/ErrorMessage' |
| 148 | example: |
| 149 | status: 500 |
| 150 | message: Internal Server Error |
| 151 | details: Internal Server Error occurred |
| 152 | /v1/ch/searches: |
| 153 | post: |
| 154 | tags: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 155 | - network-cm-proxy-inventory |
seanbeirne | 16e2358 | 2023-01-26 09:21:44 +0000 | [diff] [blame] | 156 | summary: Query for CM Handle IDs |
| 157 | description: "Query and get CMHandleIds for additional properties, public properties\ |
| 158 | \ and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin)." |
| 159 | operationId: searchCmHandleIds |
| 160 | requestBody: |
| 161 | content: |
| 162 | application/json: |
| 163 | schema: |
| 164 | $ref: '#/components/schemas/CmHandleQueryParameters' |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 165 | required: true |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 166 | responses: |
| 167 | "200": |
| 168 | description: OK |
| 169 | content: |
| 170 | application/json: |
| 171 | schema: |
| 172 | type: array |
| 173 | items: |
| 174 | type: string |
| 175 | "401": |
| 176 | description: Unauthorized |
| 177 | content: |
| 178 | application/json: |
| 179 | schema: |
| 180 | $ref: '#/components/schemas/ErrorMessage' |
| 181 | example: |
| 182 | status: 401 |
| 183 | message: Unauthorized error message |
| 184 | details: Unauthorized error details |
| 185 | "403": |
| 186 | description: Forbidden |
| 187 | content: |
| 188 | application/json: |
| 189 | schema: |
| 190 | $ref: '#/components/schemas/ErrorMessage' |
| 191 | example: |
| 192 | status: 403 |
| 193 | message: Forbidden error message |
| 194 | details: Forbidden error details |
| 195 | "500": |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 196 | description: Internal Server Error |
| 197 | content: |
| 198 | application/json: |
| 199 | schema: |
| 200 | $ref: '#/components/schemas/ErrorMessage' |
| 201 | example: |
| 202 | status: 500 |
| 203 | message: Internal Server Error |
| 204 | details: Internal Server Error occurred |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 205 | components: |
| 206 | schemas: |
| 207 | RestDmiPluginRegistration: |
| 208 | type: object |
| 209 | properties: |
| 210 | dmiPlugin: |
| 211 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 212 | example: my-dmi-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 213 | default: "" |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 214 | dmiDataPlugin: |
| 215 | type: string |
| 216 | example: my-dmi-data-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 217 | default: "" |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 218 | dmiModelPlugin: |
| 219 | type: string |
| 220 | example: my-dmi-model-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 221 | default: "" |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 222 | createdCmHandles: |
| 223 | type: array |
| 224 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 225 | $ref: '#/components/schemas/RestInputCmHandle' |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 226 | updatedCmHandles: |
| 227 | type: array |
| 228 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 229 | $ref: '#/components/schemas/RestInputCmHandle' |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 230 | removedCmHandles: |
| 231 | type: array |
Bruno Sakoto | a1129b6 | 2022-03-15 08:09:07 -0400 | [diff] [blame] | 232 | example: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 233 | - my-cm-handle1 |
| 234 | - my-cm-handle2 |
| 235 | - my-cm-handle3 |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 236 | items: |
| 237 | type: string |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 238 | RestInputCmHandle: |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 239 | required: |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 240 | - cmHandle |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 241 | type: object |
| 242 | properties: |
| 243 | cmHandle: |
| 244 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 245 | example: my-cm-handle |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 246 | cmHandleProperties: |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 247 | $ref: '#/components/schemas/RestCmHandleProperties' |
| 248 | publicCmHandleProperties: |
| 249 | $ref: '#/components/schemas/RestCmHandleProperties' |
| 250 | RestCmHandleProperties: |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 251 | type: object |
| 252 | additionalProperties: |
| 253 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 254 | example: my-property |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 255 | ErrorMessage: |
| 256 | title: Error |
| 257 | type: object |
| 258 | properties: |
| 259 | status: |
| 260 | type: string |
| 261 | message: |
| 262 | type: string |
| 263 | details: |
| 264 | type: string |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 265 | DmiPluginRegistrationErrorResponse: |
| 266 | type: object |
| 267 | properties: |
| 268 | failedCreatedCmHandles: |
| 269 | type: array |
| 270 | items: |
| 271 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 272 | failedUpdatedCmHandles: |
| 273 | type: array |
| 274 | items: |
| 275 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 276 | failedRemovedCmHandles: |
| 277 | type: array |
| 278 | items: |
| 279 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 280 | CmHandlerRegistrationErrorResponse: |
| 281 | type: object |
| 282 | properties: |
| 283 | cmHandle: |
| 284 | type: string |
| 285 | example: my-cm-handle |
| 286 | errorCode: |
| 287 | type: string |
| 288 | example: "00" |
| 289 | errorText: |
| 290 | type: string |
| 291 | example: Unknown error. <error-details> |
seanbeirne | 16e2358 | 2023-01-26 09:21:44 +0000 | [diff] [blame] | 292 | CmHandleQueryParameters: |
| 293 | title: Cm Handle query parameters for executing cm handle search |
| 294 | type: object |
| 295 | properties: |
| 296 | cmHandleQueryParameters: |
| 297 | type: array |
| 298 | items: |
| 299 | $ref: '#/components/schemas/ConditionProperties' |
| 300 | conditions: |
| 301 | type: array |
| 302 | description: "not necessary, it is just for backward compatibility" |
| 303 | deprecated: true |
| 304 | items: |
| 305 | $ref: '#/components/schemas/OldConditionProperties' |
| 306 | ConditionProperties: |
| 307 | properties: |
| 308 | conditionName: |
| 309 | type: string |
| 310 | conditionParameters: |
| 311 | type: array |
| 312 | items: |
| 313 | type: object |
| 314 | additionalProperties: |
| 315 | type: string |
| 316 | OldConditionProperties: |
| 317 | properties: |
| 318 | name: |
| 319 | type: string |
| 320 | conditionParameters: |
| 321 | type: array |
| 322 | items: |
| 323 | $ref: '#/components/schemas/ModuleNameAsJsonObject' |
| 324 | deprecated: true |
| 325 | ModuleNameAsJsonObject: |
| 326 | properties: |
| 327 | moduleName: |
| 328 | type: string |
| 329 | example: my-module |
mpriyank | 52c5e54 | 2023-05-02 15:58:55 +0100 | [diff] [blame] | 330 | responses: |
| 331 | NoContent: |
| 332 | description: No Content |
| 333 | content: {} |
| 334 | BadRequest: |
| 335 | description: Bad Request |
| 336 | content: |
| 337 | application/json: |
| 338 | schema: |
| 339 | $ref: '#/components/schemas/ErrorMessage' |
| 340 | example: |
| 341 | status: 400 BAD_REQUEST |
| 342 | message: Bad request error message |
| 343 | details: Bad request error details |
| 344 | Unauthorized: |
| 345 | description: Unauthorized |
| 346 | content: |
| 347 | application/json: |
| 348 | schema: |
| 349 | $ref: '#/components/schemas/ErrorMessage' |
| 350 | example: |
| 351 | status: 401 |
| 352 | message: Unauthorized error message |
| 353 | details: Unauthorized error details |
| 354 | Forbidden: |
| 355 | description: Forbidden |
| 356 | content: |
| 357 | application/json: |
| 358 | schema: |
| 359 | $ref: '#/components/schemas/ErrorMessage' |
| 360 | example: |
| 361 | status: 403 |
| 362 | message: Forbidden error message |
| 363 | details: Forbidden error details |
| 364 | InternalServerError: |
| 365 | description: Internal Server Error |
| 366 | content: |
| 367 | application/json: |
| 368 | schema: |
| 369 | $ref: '#/components/schemas/ErrorMessage' |
| 370 | example: |
| 371 | status: 500 |
| 372 | message: Internal Server Error |
| 373 | details: Internal Server Error occurred |
| 374 | parameters: |
| 375 | dmiPluginIdentifierInQuery: |
| 376 | name: dmi-plugin-identifier |
| 377 | in: query |
| 378 | description: dmi-plugin-identifier |
| 379 | required: true |
| 380 | schema: |
| 381 | type: string |
| 382 | example: my-dmi-plugin |
seanbeirne | 16e2358 | 2023-01-26 09:21:44 +0000 | [diff] [blame] | 383 | securitySchemes: |
| 384 | basicAuth: |
| 385 | type: http |
| 386 | scheme: basic |