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