Improve error reporting during the service import
[sdc.git] / docs / openapi / openapi-sdce-4.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 certifying services (SDCE-4)
8   license:
9     name: Apache 2.0
10     url: http://www.apache.org/licenses/LICENSE-2.0
11   title: "SPC API: SDCE-4"
12   version: "1.0"
13 servers:
14 - description: SDCE-4 APIs
15   url: /sdc
16 paths:
17   /v1/catalog/{componentCollection}/{componentId}/lifecycleState/{lifecycleOperation}:
18     post:
19       description: Change Resource lifecycle State
20       operationId: changeResourceState
21       parameters:
22       - description: "validValues: resources / services / products"
23         in: path
24         name: componentCollection
25         required: true
26         schema:
27           type: string
28           enum:
29           - resources
30           - services
31           - products
32       - in: path
33         name: lifecycleOperation
34         required: true
35         schema:
36           type: string
37           enum:
38           - "checkout, undoCheckout, checkin, certificationRequest, startCertification,\
39             \ failCertification,  cancelCertification, certify"
40       - description: id of component to be changed
41         in: path
42         name: componentId
43         required: true
44         schema:
45           type: string
46       - description: id of user initiating the operation
47         in: header
48         name: USER_ID
49         schema:
50           type: string
51       requestBody:
52         content:
53           application/json:
54             schema:
55               type: string
56         description: "LifecycleChangeInfo - relevant for checkin, failCertification,\
57           \ cancelCertification"
58       responses:
59         "200":
60           description: Resource state changed
61         "403":
62           description: Restricted operation
63         "409":
64           description: Resource already exist
65         default:
66           content:
67             application/json:
68               schema:
69                 type: array
70                 items:
71                   type: object
72                   properties:
73                     allowedMethods:
74                       type: array
75                       items:
76                         type: string
77                       uniqueItems: true
78                     cookies:
79                       type: object
80                       additionalProperties:
81                         type: object
82                         properties:
83                           comment:
84                             type: string
85                           domain:
86                             type: string
87                           expiry:
88                             type: string
89                             format: date-time
90                           httpOnly:
91                             type: boolean
92                           maxAge:
93                             type: integer
94                             format: int32
95                           name:
96                             type: string
97                           path:
98                             type: string
99                           secure:
100                             type: boolean
101                           value:
102                             type: string
103                           version:
104                             type: integer
105                             format: int32
106                     date:
107                       type: string
108                       format: date-time
109                     entity:
110                       type: object
111                     entityTag:
112                       type: object
113                       properties:
114                         value:
115                           type: string
116                         weak:
117                           type: boolean
118                     headers:
119                       type: object
120                       additionalProperties:
121                         type: array
122                         items:
123                           type: object
124                     language:
125                       type: object
126                       properties:
127                         country:
128                           type: string
129                         displayCountry:
130                           type: string
131                         displayLanguage:
132                           type: string
133                         displayName:
134                           type: string
135                         displayScript:
136                           type: string
137                         displayVariant:
138                           type: string
139                         extensionKeys:
140                           type: array
141                           items:
142                             type: string
143                           uniqueItems: true
144                         iso3Country:
145                           type: string
146                         iso3Language:
147                           type: string
148                         language:
149                           type: string
150                         script:
151                           type: string
152                         unicodeLocaleAttributes:
153                           type: array
154                           items:
155                             type: string
156                           uniqueItems: true
157                         unicodeLocaleKeys:
158                           type: array
159                           items:
160                             type: string
161                           uniqueItems: true
162                         variant:
163                           type: string
164                     lastModified:
165                       type: string
166                       format: date-time
167                     length:
168                       type: integer
169                       format: int32
170                     links:
171                       type: array
172                       items:
173                         type: object
174                         properties:
175                           params:
176                             type: object
177                             additionalProperties:
178                               type: string
179                           rel:
180                             type: string
181                           rels:
182                             type: array
183                             items:
184                               type: string
185                           title:
186                             type: string
187                           type:
188                             type: string
189                           uri:
190                             type: string
191                             format: uri
192                           uriBuilder:
193                             type: object
194                       uniqueItems: true
195                     location:
196                       type: string
197                       format: uri
198                     mediaType:
199                       type: object
200                       properties:
201                         parameters:
202                           type: object
203                           additionalProperties:
204                             type: string
205                         subtype:
206                           type: string
207                         type:
208                           type: string
209                         wildcardSubtype:
210                           type: boolean
211                         wildcardType:
212                           type: boolean
213                     metadata:
214                       type: object
215                       additionalProperties:
216                         type: array
217                         items:
218                           type: object
219                     status:
220                       type: integer
221                       format: int32
222                     statusInfo:
223                       type: object
224                       properties:
225                         family:
226                           type: string
227                           enum:
228                           - INFORMATIONAL
229                           - SUCCESSFUL
230                           - REDIRECTION
231                           - CLIENT_ERROR
232                           - SERVER_ERROR
233                           - OTHER
234                         reasonPhrase:
235                           type: string
236                         statusCode:
237                           type: integer
238                           format: int32
239                     stringHeaders:
240                       type: object
241                       additionalProperties:
242                         type: array
243                         items:
244                           type: string
245       servers:
246       - url: /sdc2/rest
247         variables: {}
248       tags:
249       - SDCE-4 APIs