blob: 2d34f0a61afe3ff17a59d7e4931fb4d5586efa08 [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:
bmiklos96d54ef2022-09-07 16:11:57 +02007- url: /ncmpInventory
niamhcorec1904c12021-10-11 16:38:53 +01008paths:
9 /v1/ch:
10 post:
11 tags:
bmiklos96d54ef2022-09-07 16:11:57 +020012 - network-cm-proxy-inventory
niamhcorec1904c12021-10-11 16:38:53 +010013 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:
emacleeafb17362022-09-02 14:40:17 +010023 "200":
mpriyank80dee972022-02-23 15:17:23 +053024 description: No Content
niamhcorec1904c12021-10-11 16:38:53 +010025 content: {}
26 "400":
27 description: Bad Request
28 content:
29 application/json:
30 schema:
31 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000032 example:
33 status: 400 BAD_REQUEST
34 message: Bad request error message
35 details: Bad request error details
niamhcorec1904c12021-10-11 16:38:53 +010036 "401":
37 description: Unauthorized
38 content:
39 application/json:
40 schema:
41 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000042 example:
43 status: 401
44 message: Unauthorized error message
45 details: Unauthorized error details
niamhcorec1904c12021-10-11 16:38:53 +010046 "403":
47 description: Forbidden
48 content:
49 application/json:
50 schema:
51 $ref: '#/components/schemas/ErrorMessage'
DylanB95EST63132ce2021-12-14 16:34:38 +000052 example:
53 status: 403
54 message: Forbidden error message
55 details: Forbidden error details
DylanB95ESTe5573382022-01-27 17:12:52 +000056 "500":
emacleeafb17362022-09-02 14:40:17 +010057 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:
bmiklos96d54ef2022-09-07 16:11:57 +020066 - 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
emacleeafb17362022-09-02 14:40:17 +010075 failedUpdatedCmHandles:
bmiklos96d54ef2022-09-07 16:11:57 +020076 - 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
emacleeafb17362022-09-02 14:40:17 +010085 failedRemovedCmHandles:
bmiklos96d54ef2022-09-07 16:11:57 +020086 - 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
emacleeafb17362022-09-02 14:40:17 +010095 /v1/ch/cmHandles:
96 get:
97 tags:
bmiklos96d54ef2022-09-07 16:11:57 +020098 - network-cm-proxy-inventory
emacleeafb17362022-09-02 14:40:17 +010099 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:
bmiklos96d54ef2022-09-07 16:11:57 +0200104 - 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
emacleeafb17362022-09-02 14:40:17 +0100111 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":
DylanB95ESTe5573382022-01-27 17:12:52 +0000141 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
niamhcorec1904c12021-10-11 16:38:53 +0100150components:
151 schemas:
152 RestDmiPluginRegistration:
153 type: object
154 properties:
155 dmiPlugin:
156 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000157 example: my-dmi-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000158 default: ""
DylanB95EST63132ce2021-12-14 16:34:38 +0000159 dmiDataPlugin:
160 type: string
161 example: my-dmi-data-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000162 default: ""
DylanB95EST63132ce2021-12-14 16:34:38 +0000163 dmiModelPlugin:
164 type: string
165 example: my-dmi-model-plugin
DylanB95ESTe5573382022-01-27 17:12:52 +0000166 default: ""
niamhcorec1904c12021-10-11 16:38:53 +0100167 createdCmHandles:
168 type: array
169 items:
DylanB95ESTe5573382022-01-27 17:12:52 +0000170 $ref: '#/components/schemas/RestInputCmHandle'
niamhcorec1904c12021-10-11 16:38:53 +0100171 updatedCmHandles:
172 type: array
173 items:
DylanB95ESTe5573382022-01-27 17:12:52 +0000174 $ref: '#/components/schemas/RestInputCmHandle'
niamhcorec1904c12021-10-11 16:38:53 +0100175 removedCmHandles:
176 type: array
Bruno Sakotoa1129b62022-03-15 08:09:07 -0400177 example:
bmiklos96d54ef2022-09-07 16:11:57 +0200178 - my-cm-handle1
179 - my-cm-handle2
180 - my-cm-handle3
niamhcorec1904c12021-10-11 16:38:53 +0100181 items:
182 type: string
DylanB95ESTe5573382022-01-27 17:12:52 +0000183 RestInputCmHandle:
niamhcorec1904c12021-10-11 16:38:53 +0100184 required:
bmiklos96d54ef2022-09-07 16:11:57 +0200185 - cmHandle
niamhcorec1904c12021-10-11 16:38:53 +0100186 type: object
187 properties:
188 cmHandle:
189 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000190 example: my-cm-handle
niamhcorec1904c12021-10-11 16:38:53 +0100191 cmHandleProperties:
DylanB95EST63132ce2021-12-14 16:34:38 +0000192 $ref: '#/components/schemas/RestCmHandleProperties'
193 publicCmHandleProperties:
194 $ref: '#/components/schemas/RestCmHandleProperties'
195 RestCmHandleProperties:
niamhcorec1904c12021-10-11 16:38:53 +0100196 type: object
197 additionalProperties:
198 type: string
DylanB95EST63132ce2021-12-14 16:34:38 +0000199 example: my-property
niamhcorec1904c12021-10-11 16:38:53 +0100200 ErrorMessage:
201 title: Error
202 type: object
203 properties:
204 status:
205 type: string
206 message:
207 type: string
208 details:
209 type: string
emacleeafb17362022-09-02 14:40:17 +0100210 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>