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: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 7 | - url: /ncmpInventory |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 8 | paths: |
| 9 | /v1/ch: |
| 10 | post: |
| 11 | tags: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 12 | - network-cm-proxy-inventory |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 13 | summary: DMI notifies NCMP of new CM Handles |
| 14 | description: "Register a DMI Plugin with any new, updated or removed CM Handles." |
| 15 | operationId: updateDmiPluginRegistration |
| 16 | requestBody: |
| 17 | content: |
| 18 | application/json: |
| 19 | schema: |
| 20 | $ref: '#/components/schemas/RestDmiPluginRegistration' |
| 21 | required: true |
| 22 | responses: |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 23 | "200": |
mpriyank | 80dee97 | 2022-02-23 15:17:23 +0530 | [diff] [blame] | 24 | description: No Content |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 25 | content: {} |
| 26 | "400": |
| 27 | description: Bad Request |
| 28 | content: |
| 29 | application/json: |
| 30 | schema: |
| 31 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 32 | example: |
| 33 | status: 400 BAD_REQUEST |
| 34 | message: Bad request error message |
| 35 | details: Bad request error details |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 36 | "401": |
| 37 | description: Unauthorized |
| 38 | content: |
| 39 | application/json: |
| 40 | schema: |
| 41 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 42 | example: |
| 43 | status: 401 |
| 44 | message: Unauthorized error message |
| 45 | details: Unauthorized error details |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 46 | "403": |
| 47 | description: Forbidden |
| 48 | content: |
| 49 | application/json: |
| 50 | schema: |
| 51 | $ref: '#/components/schemas/ErrorMessage' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 52 | example: |
| 53 | status: 403 |
| 54 | message: Forbidden error message |
| 55 | details: Forbidden error details |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 56 | "500": |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 57 | description: Partial or Complete failure. The error details are provided |
| 58 | in the response body and all supported error codes are documented in the |
| 59 | example. |
| 60 | content: |
| 61 | application/json: |
| 62 | schema: |
| 63 | $ref: '#/components/schemas/DmiPluginRegistrationErrorResponse' |
| 64 | example: |
| 65 | failedCreatedCmHandles: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 66 | - cmHandle: my-cm-handle-01 |
| 67 | errorCode: "00" |
| 68 | errorText: Unknown error. <error-details> |
| 69 | - cmHandle: my-cm-handle-02 |
| 70 | errorCode: "01" |
| 71 | errorText: cm-handle already exists |
| 72 | - cmHandle: my-cm-handle-03 |
| 73 | errorCode: "03" |
| 74 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 75 | failedUpdatedCmHandles: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 76 | - cmHandle: my-cm-handle-01 |
| 77 | errorCode: "00" |
| 78 | errorText: Unknown error. <error-details> |
| 79 | - cmHandle: my-cm-handle-02 |
| 80 | errorCode: "02" |
| 81 | errorText: cm-handle does not exist |
| 82 | - cmHandle: my-cm-handle-03 |
| 83 | errorCode: "03" |
| 84 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 85 | failedRemovedCmHandles: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 86 | - cmHandle: my-cm-handle-01 |
| 87 | errorCode: "00" |
| 88 | errorText: Unknown error. <error-details> |
| 89 | - cmHandle: my-cm-handle-02 |
| 90 | errorCode: "02" |
| 91 | errorText: cm-handle does not exists |
| 92 | - cmHandle: my-cm-handle-03 |
| 93 | errorCode: "03" |
| 94 | errorText: cm-handle has an invalid character(s) in id |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 95 | /v1/ch/cmHandles: |
| 96 | get: |
| 97 | tags: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 98 | - network-cm-proxy-inventory |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 99 | summary: "Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI\ |
| 100 | \ data plugin, DMI model plugin)" |
| 101 | description: Get all cm handle IDs for a registered DMI plugin |
| 102 | operationId: getAllCmHandleIdsForRegisteredDmi |
| 103 | parameters: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 104 | - name: dmi-plugin-identifier |
| 105 | in: query |
| 106 | description: dmi-plugin-identifier |
| 107 | required: true |
| 108 | schema: |
| 109 | type: string |
| 110 | example: my-dmi-plugin |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 111 | responses: |
| 112 | "200": |
| 113 | description: OK |
| 114 | content: |
| 115 | application/json: |
| 116 | schema: |
| 117 | type: array |
| 118 | items: |
| 119 | type: string |
| 120 | "401": |
| 121 | description: Unauthorized |
| 122 | content: |
| 123 | application/json: |
| 124 | schema: |
| 125 | $ref: '#/components/schemas/ErrorMessage' |
| 126 | example: |
| 127 | status: 401 |
| 128 | message: Unauthorized error message |
| 129 | details: Unauthorized error details |
| 130 | "403": |
| 131 | description: Forbidden |
| 132 | content: |
| 133 | application/json: |
| 134 | schema: |
| 135 | $ref: '#/components/schemas/ErrorMessage' |
| 136 | example: |
| 137 | status: 403 |
| 138 | message: Forbidden error message |
| 139 | details: Forbidden error details |
| 140 | "500": |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 141 | description: Internal Server Error |
| 142 | content: |
| 143 | application/json: |
| 144 | schema: |
| 145 | $ref: '#/components/schemas/ErrorMessage' |
| 146 | example: |
| 147 | status: 500 |
| 148 | message: Internal Server Error |
| 149 | details: Internal Server Error occurred |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 150 | components: |
| 151 | schemas: |
| 152 | RestDmiPluginRegistration: |
| 153 | type: object |
| 154 | properties: |
| 155 | dmiPlugin: |
| 156 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 157 | example: my-dmi-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 158 | default: "" |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 159 | dmiDataPlugin: |
| 160 | type: string |
| 161 | example: my-dmi-data-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 162 | default: "" |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 163 | dmiModelPlugin: |
| 164 | type: string |
| 165 | example: my-dmi-model-plugin |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 166 | default: "" |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 167 | createdCmHandles: |
| 168 | type: array |
| 169 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 170 | $ref: '#/components/schemas/RestInputCmHandle' |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 171 | updatedCmHandles: |
| 172 | type: array |
| 173 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 174 | $ref: '#/components/schemas/RestInputCmHandle' |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 175 | removedCmHandles: |
| 176 | type: array |
Bruno Sakoto | a1129b6 | 2022-03-15 08:09:07 -0400 | [diff] [blame] | 177 | example: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 178 | - my-cm-handle1 |
| 179 | - my-cm-handle2 |
| 180 | - my-cm-handle3 |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 181 | items: |
| 182 | type: string |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 183 | RestInputCmHandle: |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 184 | required: |
bmiklos | 96d54ef | 2022-09-07 16:11:57 +0200 | [diff] [blame] | 185 | - cmHandle |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 186 | type: object |
| 187 | properties: |
| 188 | cmHandle: |
| 189 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 190 | example: my-cm-handle |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 191 | cmHandleProperties: |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 192 | $ref: '#/components/schemas/RestCmHandleProperties' |
| 193 | publicCmHandleProperties: |
| 194 | $ref: '#/components/schemas/RestCmHandleProperties' |
| 195 | RestCmHandleProperties: |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 196 | type: object |
| 197 | additionalProperties: |
| 198 | type: string |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 199 | example: my-property |
niamhcore | c1904c1 | 2021-10-11 16:38:53 +0100 | [diff] [blame] | 200 | ErrorMessage: |
| 201 | title: Error |
| 202 | type: object |
| 203 | properties: |
| 204 | status: |
| 205 | type: string |
| 206 | message: |
| 207 | type: string |
| 208 | details: |
| 209 | type: string |
emaclee | afb1736 | 2022-09-02 14:40:17 +0100 | [diff] [blame] | 210 | DmiPluginRegistrationErrorResponse: |
| 211 | type: object |
| 212 | properties: |
| 213 | failedCreatedCmHandles: |
| 214 | type: array |
| 215 | items: |
| 216 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 217 | failedUpdatedCmHandles: |
| 218 | type: array |
| 219 | items: |
| 220 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 221 | failedRemovedCmHandles: |
| 222 | type: array |
| 223 | items: |
| 224 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
| 225 | CmHandlerRegistrationErrorResponse: |
| 226 | type: object |
| 227 | properties: |
| 228 | cmHandle: |
| 229 | type: string |
| 230 | example: my-cm-handle |
| 231 | errorCode: |
| 232 | type: string |
| 233 | example: "00" |
| 234 | errorText: |
| 235 | type: string |
| 236 | example: Unknown error. <error-details> |