Improve error reporting during the service import
[sdc.git] / docs / openapi / openapi-sdce-6.yaml
1 openapi: 3.0.1
2 info:
3   contact:
4     email: onap-discuss@lists.onap.org
5     name: ONAP
6     url: https://onap.readthedocs.io
7   description: SDC API for distribution subscription (SDCE-6)
8   license:
9     name: Apache 2.0
10     url: http://www.apache.org/licenses/LICENSE-2.0
11   title: "SPC API: SDCE-6"
12   version: "1.0"
13 servers:
14 - description: SDCE-6 APIs
15   url: /sdc
16 paths:
17   /v1/artifactTypes:
18     get:
19       description: Artifact types list
20       operationId: getValidArtifactTypes
21       parameters:
22       - description: X-ECOMP-RequestID header
23         in: header
24         name: X-ECOMP-RequestID
25         schema:
26           type: string
27       - description: X-ECOMP-InstanceID header
28         in: header
29         name: X-ECOMP-InstanceID
30         required: true
31         schema:
32           type: string
33       - description: The username and password
34         in: header
35         name: Authorization
36         required: true
37         schema:
38           type: string
39       - description: The username and password
40         in: header
41         name: Accept
42         required: true
43         schema:
44           type: string
45       responses:
46         "200":
47           content:
48             application/json:
49               schema:
50                 type: array
51                 items:
52                   type: string
53           description: Artifact types list fetched successfully
54         "400":
55           description: Missing  'X-ECOMP-InstanceID'  HTTP header - POL5001
56         "401":
57           description: ECOMP component  should authenticate itself  and  to  re-send  again  HTTP  request  with
58             its Basic Authentication credentials - POL5002
59         "403":
60           description: ECOMP component is not authorized - POL5003
61         "405":
62           description: "Method  Not Allowed  :  Invalid HTTP method type used to \
63             \ register for  distribution ( POST,PUT,DELETE  will be rejected) - POL4050"
64         "500":
65           description: The registration failed due to internal SDC problem or Cambria
66             Service failure ECOMP Component  should  continue the attempts to  register
67             for  distribution - POL5000
68       servers:
69       - url: /sdc
70         variables: {}
71       summary: Fetches available artifact types list
72       tags:
73       - SDCE-6 APIs
74   /v1/distributionKafkaData:
75     get:
76       description: Kafka data
77       operationId: getKafkaData
78       parameters:
79       - description: X-ECOMP-RequestID header
80         in: header
81         name: X-ECOMP-RequestID
82         schema:
83           type: string
84       - description: X-ECOMP-InstanceID header
85         in: header
86         name: X-ECOMP-InstanceID
87         required: true
88         schema:
89           type: string
90       - description: Determines the format of the body of the response
91         in: header
92         name: Accept
93         schema:
94           type: string
95       - description: The username and password
96         in: header
97         name: Authorization
98         required: true
99         schema:
100           type: string
101       responses:
102         "200":
103           content:
104             application/json:
105               schema:
106                 type: array
107                 items:
108                   $ref: '#/components/schemas/KafkaDataResponse'
109           description: ECOMP component is authenticated and kafka endpoint and topic
110             list is returned
111         "400":
112           description: Missing 'X-ECOMP-InstanceID'  HTTP header - POL5001
113         "401":
114           description: ECOMP component  should authenticate itself  and  to  re-send  again  HTTP  request  with
115             its credentials  for  Basic Authentication - POL5002
116         "403":
117           description: ECOMP component is not authorized - POL5003
118         "405":
119           description: "Method  Not Allowed: Invalid HTTP method type used ( PUT,DELETE,POST\
120             \ will be rejected) - POL4050"
121         "500":
122           description: The GET request failed either due to internal SDC problem or
123             Cambria Service failure. ECOMP Component should continue the attempts
124             to get the needed information - POL5000
125       servers:
126       - url: /sdc
127         variables: {}
128       summary: return the kafka cluster and topic list
129       tags:
130       - SDCE-6 APIs
131   /v1/distributionUebCluster:
132     get:
133       description: UEB Server List
134       operationId: getUebServerList
135       parameters:
136       - description: X-ECOMP-RequestID header
137         in: header
138         name: X-ECOMP-RequestID
139         schema:
140           type: string
141       - description: X-ECOMP-InstanceID header
142         in: header
143         name: X-ECOMP-InstanceID
144         required: true
145         schema:
146           type: string
147       - description: Determines the format of the body of the response
148         in: header
149         name: Accept
150         schema:
151           type: string
152       - description: The username and password
153         in: header
154         name: Authorization
155         required: true
156         schema:
157           type: string
158       responses:
159         "200":
160           content:
161             application/json:
162               schema:
163                 type: array
164                 items:
165                   $ref: '#/components/schemas/ServerListResponse'
166           description: ECOMP component is authenticated and list of Cambria API server’s
167             FQDNs is returned
168         "400":
169           description: Missing  'X-ECOMP-InstanceID'  HTTP header - POL5001
170         "401":
171           description: ECOMP component  should authenticate itself  and  to  re-send  again  HTTP  request  with
172             its credentials  for  Basic Authentication - POL5002
173         "403":
174           description: ECOMP component is not authorized - POL5003
175         "405":
176           description: "Method  Not Allowed: Invalid HTTP method type used ( PUT,DELETE,POST\
177             \ will be rejected) - POL4050"
178         "500":
179           description: The GET request failed either due to internal SDC problem or
180             Cambria Service failure. ECOMP Component should continue the attempts
181             to get the needed information - POL5000
182       servers:
183       - url: /sdc
184         variables: {}
185       summary: return the available UEB Server List
186       tags:
187       - SDCE-6 APIs
188   /v1/registerForDistribution:
189     post:
190       description: Subscription status
191       operationId: registerForDistribution
192       parameters:
193       - description: X-ECOMP-RequestID header
194         in: header
195         name: X-ECOMP-RequestID
196         schema:
197           type: string
198       - description: X-ECOMP-InstanceID header
199         in: header
200         name: X-ECOMP-InstanceID
201         required: true
202         schema:
203           type: string
204       - description: Determines the format of the body of the response
205         in: header
206         name: Accept
207         schema:
208           type: string
209       - description: Determines the format of the body of the request
210         in: header
211         name: Content-Type
212         required: true
213         schema:
214           type: string
215       - description: Length  of  the request body
216         in: header
217         name: Content-Length
218         required: true
219         schema:
220           type: string
221       - description: The username and password
222         in: header
223         name: Authorization
224         required: true
225         schema:
226           type: string
227       responses:
228         "200":
229           content:
230             application/json:
231               schema:
232                 type: array
233                 items:
234                   $ref: '#/components/schemas/TopicRegistrationResponse'
235           description: ECOMP component is successfully registered for distribution
236         "400":
237           description: "Invalid Body :  Specified 'distrEnvName' doesn’t exist - POL4137"
238         "401":
239           description: ECOMP component  should authenticate itself  and  to  re-send  again  HTTP  request  with
240             its Basic Authentication credentials - POL5002
241         "403":
242           description: ECOMP component is not authorized - POL5003
243         "405":
244           description: "Method  Not Allowed  :  Invalid HTTP method type used to \
245             \ register for  distribution ( PUT,DELETE,GET  will be rejected) - POL4050"
246         "500":
247           description: The registration failed due to internal SDC problem or Cambria
248             Service failure ECOMP Component  should  continue the attempts to  register
249             for  distribution - POL5000
250       servers:
251       - url: /sdc
252         variables: {}
253       summary: Subscribes for distribution notifications
254       tags:
255       - SDCE-6 APIs
256   /v1/unRegisterForDistribution:
257     post:
258       description: Subscription status
259       operationId: unRegisterForDistribution
260       parameters:
261       - description: X-ECOMP-RequestID header
262         in: header
263         name: X-ECOMP-RequestID
264         schema:
265           type: string
266       - description: X-ECOMP-InstanceID header
267         in: header
268         name: X-ECOMP-InstanceID
269         required: true
270         schema:
271           type: string
272       - description: Determines the format of the body of the response
273         in: header
274         name: Accept
275         schema:
276           type: string
277       - description: Determines the format of the body of the request
278         in: header
279         name: Content-Type
280         required: true
281         schema:
282           type: string
283       - description: Length  of  the request body
284         in: header
285         name: Content-Length
286         required: true
287         schema:
288           type: string
289       - description: The username and password
290         in: header
291         name: Authorization
292         required: true
293         schema:
294           type: string
295       responses:
296         "204":
297           content:
298             application/json:
299               schema:
300                 type: array
301                 items:
302                   $ref: '#/components/schemas/TopicUnregistrationResponse'
303           description: ECOMP component is successfully unregistered
304         "400":
305           description: "Invalid Body :  Specified 'distrEnvName' doesn’t exist - POL4137"
306         "401":
307           description: ECOMP component  should authenticate itself  and  to  re-send  again  HTTP  request  with
308             its Basic Authentication credentials - POL5002
309         "403":
310           description: ECOMP component is not authorized - POL5003
311         "405":
312           description: "Method  Not Allowed  :  Invalid HTTP method type used to \
313             \ register for  distribution ( PUT,DELETE,GET will be rejected) - POL4050"
314         "500":
315           description: The registration failed due to internal SDC problem or Cambria
316             Service failure ECOMP Component  should  continue the attempts to  register
317             for  distribution - POL5000
318       servers:
319       - url: /sdc
320         variables: {}
321       summary: Removes from subscription for distribution notifications
322       tags:
323       - SDCE-6 APIs
324 components:
325   schemas:
326     KafkaDataResponse:
327       type: object
328       properties:
329         distrNotificationTopicName:
330           type: string
331         distrStatusTopicName:
332           type: string
333         kafkaBootStrapServer:
334           type: string
335     RegistrationRequest:
336       type: object
337       properties:
338         apiPublicKey:
339           type: string
340         distEnvEndPoints:
341           type: array
342           items:
343             type: string
344         distrEnvName:
345           type: string
346         isConsumerToSdcDistrStatusTopic:
347           type: boolean
348         managerApiPublicKey:
349           type: string
350         managerApiSecretKey:
351           type: string
352     ServerListResponse:
353       type: object
354       properties:
355         uebServerList:
356           type: array
357           items:
358             type: string
359     TopicRegistrationResponse:
360       type: object
361       properties:
362         distrNotificationTopicName:
363           type: string
364         distrStatusTopicName:
365           type: string
366     TopicUnregistrationResponse:
367       type: object
368       properties:
369         distrNotificationTopicName:
370           type: string
371         distrStatusTopicName:
372           type: string
373         notificationUnregisterResult:
374           type: string
375           enum:
376           - OK
377           - CONNNECTION_ERROR
378           - NOT_FOUND
379           - TOPIC_ALREADY_EXIST
380           - OBJECT_NOT_FOUND
381           - INTERNAL_SERVER_ERROR
382           - AUTHENTICATION_ERROR
383           - UNKNOWN_HOST_ERROR
384         statusUnregisterResult:
385           type: string
386           enum:
387           - OK
388           - CONNNECTION_ERROR
389           - NOT_FOUND
390           - TOPIC_ALREADY_EXIST
391           - OBJECT_NOT_FOUND
392           - INTERNAL_SERVER_ERROR
393           - AUTHENTICATION_ERROR
394           - UNKNOWN_HOST_ERROR