Merge "Add additional unit tests and asserts for NS Heal."
[vfc/nfvo/lcm.git] / lcm / swagger / vfc.sfclcm.swagger.json
1 {
2     "swagger": "2.0",
3     "info": {
4         "version": "1.0.0",
5         "title": "ONAP VFC Service SFC Rest API"
6     },
7     "basePath": "/api/nslcm/v1",
8     "paths": {
9         "/ns/sfcs": {
10             "post": {
11                 "tags": [
12                     "sfc"
13                 ],
14                 "summary": "sfc create",
15                 "description": "",
16                 "operationId": "create_sfc",
17                 "consumes": [
18                     "application/json"
19                 ],
20                 "produces": [
21                     "application/json"
22                 ],
23                 "parameters": [
24                     {
25                         "in": "body",
26                         "name": "body",
27                         "description": "request param",
28                         "required": true,
29                         "schema": {
30                             "$ref": "#/definitions/SfcPostRequest"
31                         }
32                     }
33                 ],
34                 "responses": {
35                     "201": {
36                         "description": "",
37                         "schema": {
38                             "$ref": "#/definitions/SfcPostResponse"
39                         }
40                     }
41                 }
42             }
43         },
44         "/ns/sfcs/{sfcInstId}": {
45             "get": {
46                 "tags": [
47                     "sfc"
48                 ],
49                 "summary": "query the specified sfc info",
50                 "description": "",
51                 "operationId": "query_sfc",
52                 "consumes": [
53                     "application/json"
54                 ],
55                 "produces": [
56                     "application/json"
57                 ],
58                 "parameters": [
59                     {
60                         "name": "sfcInstId",
61                         "in": "path",
62                         "description": "sfc instance id",
63                         "required": true,
64                         "type": "string"
65                     }
66                 ],
67                 "responses": {
68                     "200": {
69                         "description": "successful operation",
70                         "schema": {
71                             "$ref": "#/definitions/SfcInfo"
72                         }
73                     },
74                     "404": {
75                         "description": "the sfc instance id is wrong"
76                     },
77                     "500": {
78                         "description": "the url is invalid"
79                     }
80                 }
81             },
82             "delete": {
83                 "tags": [
84                     "sfc"
85                 ],
86                 "summary": "delete sfc",
87                 "description": "",
88                 "operationId": "delete_sfc",
89                 "consumes": [
90                     "application/json"
91                 ],
92                 "produces": [
93                     "application/json"
94                 ],
95                 "parameters": [
96                     {
97                         "required": true,
98                         "type": "string",
99                         "description": "",
100                         "name": "sfcInstId",
101                         "in": "path"
102                     }
103                 ],
104                 "responses": {
105                     "204": {
106                         "description": "successful operation",
107                         "schema": {
108                             "$ref": "#/definitions/DeleteResponse"
109                         }
110                     },
111                     "404": {
112                         "description": "the sfc instance id is wrong"
113                     },
114                     "500": {
115                         "description": "the url is invalid"
116                     }
117                 }
118             }
119         }
120     },
121     "definitions": {
122         
123         "SfcPostRequest": {
124             "type": "object",
125             "properties": {
126                 "jobId": {
127                     "type": "string"
128                 },
129                 "nsInstanceId": {
130                     "type": "string"
131                 },
132                 "sapData": {
133                     "type": "array",
134                     "items": {
135                         "type": "object"
136                     }
137                 },
138                 "vnfInstanceData": {
139                     "type": "array",
140                     "items": {
141                         "type": "object"
142                     }
143                 },
144                 "additionalParamForNs": {
145                     "type": "array",
146                     "items": {
147                         "type": "object"
148                     }
149                 },
150                 "additionalParamForVnf": {
151                     "type": "array",
152                     "items": {
153                         "type": "object"
154                     }
155                 },
156                 "sdnControllerId": {
157                     "type": "string"
158                 },
159                 "context": {
160                     "type": "string"
161                 },
162                 "fpindex": {
163                     "type": "string"
164                 }
165             }
166         },
167         "SfcPostResponse": {
168             "type": "object",
169             "properties": {
170                 "sfcInstId": {
171                     "type": "string"
172                 },
173                 "jobId": {
174                     "type": "string"
175                 }
176             }
177         },
178         "VlInfo": {
179             "type": "object",
180             "properties": {
181                 "vlId": {
182                     "type": "string"
183                 },
184                 "vlName": {
185                     "type": "string"
186                 },
187                 "vlStatus": {
188                     "type": "string"
189                 }
190             }
191         },
192         "VnfInfo": {
193             "type": "object",
194             "properties": {
195                 "vnfInstId": {
196                     "type": "string"
197                 },
198                 "vnfName": {
199                     "type": "string"
200                 },
201                 "vnfStatus": {
202                     "type": "string"
203                 }
204             }
205         },
206         
207         "DeleteResponse": {
208             "type": "object",
209             "properties": {
210                 "result": {
211                     "type": "integer",
212                     "enum": [
213                         0,
214                         1
215                     ]
216                 },
217                 "detail": {
218                     "type": "string"
219                 }
220             }
221         },        
222         "SfcInfo": {
223             "type": "object",
224             "properties": {
225                 "sfcInstId": {
226                     "type": "string"
227                 },
228                 "sfcName": {
229                     "type": "string"
230                 },
231                 "sfcStatus": {
232                     "type": "string"
233                 }
234             }
235         }
236     }
237 }