blob: 3bf93a1e54346b82de0987531f3abe29102d6022 [file] [log] [blame]
niamhcorec1904c12021-10-11 16:38:53 +01001openapi: 3.0.1
2info:
3 title: NCMP Inventory API
4 description: NCMP Inventory API
5 version: "1.0"
6servers:
seanbeirne16e23582023-01-26 09:21:44 +00007 - url: /ncmpInventory
8security:
9 - basicAuth: []
niamhcorec1904c12021-10-11 16:38:53 +010010paths:
11 /v1/ch:
12 post:
13 tags:
seanbeirne16e23582023-01-26 09:21:44 +000014 - network-cm-proxy-inventory
niamhcorec1904c12021-10-11 16:38:53 +010015 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:
emacleeafb17362022-09-02 14:40:17 +010025 "200":
mpriyank80dee972022-02-23 15:17:23 +053026 description: No Content
niamhcorec1904c12021-10-11 16:38:53 +010027 content: {}
28 "400":
29 description: Bad Request
30 content:
31 application/json:
32 schema:
33 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000034 example:
35 status: 400 BAD_REQUEST
36 message: Bad request error message
37 details: Bad request error details
niamhcorec1904c12021-10-11 16:38:53 +010038 "401":
39 description: Unauthorized
40 content:
41 application/json:
42 schema:
43 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000044 example:
45 status: 401
46 message: Unauthorized error message
47 details: Unauthorized error details
niamhcorec1904c12021-10-11 16:38:53 +010048 "403":
49 description: Forbidden
50 content:
51 application/json:
52 schema:
53 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000054 example:
55 status: 403
56 message: Forbidden error message
57 details: Forbidden error details
DylanB95ESTe5573382022-01-27 17:12:52 +000058 "500":
emacleeafb17362022-09-02 14:40:17 +010059 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:
seanbeirne16e23582023-01-26 09:21:44 +000068 - 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
emacleeafb17362022-09-02 14:40:17 +010077 failedUpdatedCmHandles:
seanbeirne16e23582023-01-26 09:21:44 +000078 - 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
emacleeafb17362022-09-02 14:40:17 +010087 failedRemovedCmHandles:
seanbeirne16e23582023-01-26 09:21:44 +000088 - 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
emacleeafb17362022-09-02 14:40:17 +010097 /v1/ch/cmHandles:
98 get:
99 tags:
seanbeirne16e23582023-01-26 09:21:44 +0000100 - network-cm-proxy-inventory
emacleeafb17362022-09-02 14:40:17 +0100101 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:
seanbeirne16e23582023-01-26 09:21:44 +0000106 - 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
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:
155 - network-cm-proxy-inventory
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'
bmiklos96d54ef2022-09-07 16:11:57 +0200165 required: true
emacleeafb17362022-09-02 14:40:17 +0100166 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":
DylanB95ESTe5573382022-01-27 17:12:52 +0000196 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
niamhcorec1904c12021-10-11 16:38:53 +0100205components:
206 schemas:
207 RestDmiPluginRegistration:
208 type: object
209 properties:
210 dmiPlugin:
211 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000212 example: my-dmi-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000213 default: ""
DylanB95EST63132ce2021-12-14 16:34:38 +0000214 dmiDataPlugin:
215 type: string
216 example: my-dmi-data-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000217 default: ""
DylanB95EST63132ce2021-12-14 16:34:38 +0000218 dmiModelPlugin:
219 type: string
220 example: my-dmi-model-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000221 default: ""
niamhcorec1904c12021-10-11 16:38:53 +0100222 createdCmHandles:
223 type: array
224 items:
DylanB95ESTe5573382022-01-27 17:12:52 +0000225 $ref: '#/components/schemas/RestInputCmHandle'
niamhcorec1904c12021-10-11 16:38:53 +0100226 updatedCmHandles:
227 type: array
228 items:
DylanB95ESTe5573382022-01-27 17:12:52 +0000229 $ref: '#/components/schemas/RestInputCmHandle'
niamhcorec1904c12021-10-11 16:38:53 +0100230 removedCmHandles:
231 type: array
Bruno Sakotoa1129b62022-03-15 08:09:07 -0400232 example:
seanbeirne16e23582023-01-26 09:21:44 +0000233 - my-cm-handle1
234 - my-cm-handle2
235 - my-cm-handle3
niamhcorec1904c12021-10-11 16:38:53 +0100236 items:
237 type: string
DylanB95ESTe5573382022-01-27 17:12:52 +0000238 RestInputCmHandle:
niamhcorec1904c12021-10-11 16:38:53 +0100239 required:
seanbeirne16e23582023-01-26 09:21:44 +0000240 - cmHandle
niamhcorec1904c12021-10-11 16:38:53 +0100241 type: object
242 properties:
243 cmHandle:
244 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000245 example: my-cm-handle
niamhcorec1904c12021-10-11 16:38:53 +0100246 cmHandleProperties:
DylanB95EST63132ce2021-12-14 16:34:38 +0000247 $ref: '#/components/schemas/RestCmHandleProperties'
248 publicCmHandleProperties:
249 $ref: '#/components/schemas/RestCmHandleProperties'
250 RestCmHandleProperties:
niamhcorec1904c12021-10-11 16:38:53 +0100251 type: object
252 additionalProperties:
253 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000254 example: my-property
niamhcorec1904c12021-10-11 16:38:53 +0100255 ErrorMessage:
256 title: Error
257 type: object
258 properties:
259 status:
260 type: string
261 message:
262 type: string
263 details:
264 type: string
emacleeafb17362022-09-02 14:40:17 +0100265 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>
seanbeirne16e23582023-01-26 09:21:44 +0000292 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
330 securitySchemes:
331 basicAuth:
332 type: http
333 scheme: basic