Add more textual explanation in api doc
[policy/parent.git] / docs / api / swagger / operational-policy-api.json
1 {
2   "swagger" : "2.0",
3   "basePath" : "/",
4   "tags" : [ {
5     "name" : "Legacy Operational Policy"
6   } ],
7   "schemes" : [ "http", "https" ],
8   "paths" : {
9     "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/latest" : {
10       "get" : {
11         "tags" : [ "Legacy Operational Policy" ],
12         "summary" : "Retrieve the latest version of a particular operational policy",
13         "description" : "Returns the latest version of the specified operational policy",
14         "operationId" : "getLatestVersionOfOperationalPolicy",
15         "produces" : [ "application/json" ],
16         "parameters" : [ {
17           "name" : "policyId",
18           "in" : "path",
19           "description" : "ID of policy",
20           "required" : true,
21           "type" : "string"
22         }, {
23           "name" : "X-ONAP-RequestID",
24           "in" : "header",
25           "description" : "RequestID for http transaction",
26           "required" : false,
27           "type" : "string",
28           "format" : "uuid"
29         } ],
30         "responses" : {
31           "200" : {
32             "description" : "successful operation; Latest version of specified operational policy will be returned.",
33             "headers" : {
34               "X-MinorVersion" : {
35                 "type" : "string",
36                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
37               },
38               "X-PatchVersion" : {
39                 "type" : "string",
40                 "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
41               },
42               "X-LatestVersion" : {
43                 "type" : "string",
44                 "description" : "Used only to communicate an API's latest version"
45               },
46               "X-ONAP-RequestID" : {
47                 "type" : "string",
48                 "format" : "uuid",
49                 "description" : "Used to track REST transactions for logging purpose"
50               }
51             },
52             "schema" : {
53               "$ref" : "#/definitions/LegacyOperationalPolicy"
54             }
55           },
56           "401" : {
57             "description" : "Authentication Error"
58           },
59           "403" : {
60             "description" : "Authorization Error"
61           },
62           "404" : {
63             "description" : "Resource Not Found"
64           },
65           "500" : {
66             "description" : "Internal Server Error"
67           }
68         },
69         "security" : [ {
70           "basicAuth" : [ ]
71         } ],
72         "x-interface info" : {
73           "api-version" : "1.0.0",
74           "last-mod-release" : "Dublin"
75         }
76       }
77     },
78     "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : {
79       "get" : {
80         "tags" : [ "Legacy Operational Policy" ],
81         "summary" : "Retrieve one version of a particular operational policy",
82         "description" : "Returns a particular version of a specified operational policy",
83         "operationId" : "getSpecificVersionOfOperationalPolicy",
84         "produces" : [ "application/json" ],
85         "parameters" : [ {
86           "name" : "policyId",
87           "in" : "path",
88           "description" : "ID of policy",
89           "required" : true,
90           "type" : "string"
91         }, {
92           "name" : "policyVersion",
93           "in" : "path",
94           "description" : "Version of policy",
95           "required" : true,
96           "type" : "string"
97         }, {
98           "name" : "X-ONAP-RequestID",
99           "in" : "header",
100           "description" : "RequestID for http transaction",
101           "required" : false,
102           "type" : "string",
103           "format" : "uuid"
104         } ],
105         "responses" : {
106           "200" : {
107             "description" : "successful operation; Specified version of specified operational policy will be returned.",
108             "headers" : {
109               "X-MinorVersion" : {
110                 "type" : "string",
111                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
112               },
113               "X-PatchVersion" : {
114                 "type" : "string",
115                 "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
116               },
117               "X-LatestVersion" : {
118                 "type" : "string",
119                 "description" : "Used only to communicate an API's latest version"
120               },
121               "X-ONAP-RequestID" : {
122                 "type" : "string",
123                 "format" : "uuid",
124                 "description" : "Used to track REST transactions for logging purpose"
125               }
126             },
127             "schema" : {
128               "$ref" : "#/definitions/LegacyOperationalPolicy"
129             }
130           },
131           "401" : {
132             "description" : "Authentication Error"
133           },
134           "403" : {
135             "description" : "Authorization Error"
136           },
137           "404" : {
138             "description" : "Resource Not Found"
139           },
140           "500" : {
141             "description" : "Internal Server Error"
142           }
143         },
144         "security" : [ {
145           "basicAuth" : [ ]
146         } ],
147         "x-interface info" : {
148           "api-version" : "1.0.0",
149           "last-mod-release" : "Dublin"
150         }
151       },
152       "delete" : {
153         "tags" : [ "Legacy Operational Policy" ],
154         "summary" : "Delete a particular version of a specified operational policy",
155         "description" : "Delete a particular version of an operational policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted",
156         "operationId" : "deleteSpecificVersionOfOperationalPolicy",
157         "produces" : [ "application/json" ],
158         "parameters" : [ {
159           "name" : "policyId",
160           "in" : "path",
161           "description" : "ID of policy",
162           "required" : true,
163           "type" : "string"
164         }, {
165           "name" : "policyVersion",
166           "in" : "path",
167           "description" : "Version of policy",
168           "required" : true,
169           "type" : "string"
170         }, {
171           "name" : "X-ONAP-RequestID",
172           "in" : "header",
173           "description" : "RequestID for http transaction",
174           "required" : false,
175           "type" : "string",
176           "format" : "uuid"
177         } ],
178         "responses" : {
179           "200" : {
180             "description" : "successful operation; Newly deleted operational policy will be returned.",
181             "headers" : {
182               "X-MinorVersion" : {
183                 "type" : "string",
184                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
185               },
186               "X-PatchVersion" : {
187                 "type" : "string",
188                 "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
189               },
190               "X-LatestVersion" : {
191                 "type" : "string",
192                 "description" : "Used only to communicate an API's latest version"
193               },
194               "X-ONAP-RequestID" : {
195                 "type" : "string",
196                 "format" : "uuid",
197                 "description" : "Used to track REST transactions for logging purpose"
198               }
199             },
200             "schema" : {
201               "$ref" : "#/definitions/LegacyOperationalPolicy"
202             }
203           },
204           "401" : {
205             "description" : "Authentication Error"
206           },
207           "403" : {
208             "description" : "Authorization Error"
209           },
210           "404" : {
211             "description" : "Resource Not Found"
212           },
213           "409" : {
214             "description" : "Delete Conflict, Rule Violation"
215           },
216           "500" : {
217             "description" : "Internal Server Error"
218           }
219         },
220         "security" : [ {
221           "basicAuth" : [ ]
222         } ],
223         "x-interface info" : {
224           "api-version" : "1.0.0",
225           "last-mod-release" : "Dublin"
226         }
227       }
228     },
229     "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" : {
230       "post" : {
231         "tags" : [ "Legacy Operational Policy" ],
232         "summary" : "Create a new operational policy",
233         "description" : "Create a new operational policy. Client should provide entity body of the new operational policy",
234         "operationId" : "createOperationalPolicy",
235         "consumes" : [ "application/json" ],
236         "produces" : [ "application/json" ],
237         "parameters" : [ {
238           "name" : "X-ONAP-RequestID",
239           "in" : "header",
240           "description" : "RequestID for http transaction",
241           "required" : false,
242           "type" : "string",
243           "format" : "uuid"
244         }, {
245           "in" : "body",
246           "name" : "body",
247           "description" : "Entity body of policy",
248           "required" : true,
249           "type" : "ToscaServiceTemplate",
250           "schema" : {
251             "$ref" : "#/definitions/LegacyOperationalPolicy"
252           }
253         } ],
254         "responses" : {
255           "200" : {
256             "description" : "successful operation; Newly created operational policy will be returned.",
257             "headers" : {
258               "X-MinorVersion" : {
259                 "type" : "string",
260                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
261               },
262               "X-PatchVersion" : {
263                 "type" : "string",
264                 "description" : "Used only to communicate a PATCH version in a response for troubleshooting purposes only, and will not be provided by the client on request"
265               },
266               "X-LatestVersion" : {
267                 "type" : "string",
268                 "description" : "Used only to communicate an API's latest version"
269               },
270               "X-ONAP-RequestID" : {
271                 "type" : "string",
272                 "format" : "uuid",
273                 "description" : "Used to track REST transactions for logging purpose"
274               }
275             },
276             "schema" : {
277               "$ref" : "#/definitions/LegacyOperationalPolicy"
278             }
279           },
280           "400" : {
281             "description" : "Invalid Body"
282           },
283           "401" : {
284             "description" : "Authentication Error"
285           },
286           "403" : {
287             "description" : "Authorization Error"
288           },
289           "500" : {
290             "description" : "Internal Server Error"
291           }
292         },
293         "security" : [ {
294           "basicAuth" : [ ]
295         } ],
296         "x-interface info" : {
297           "api-version" : "1.0.0",
298           "last-mod-release" : "Dublin"
299         }
300       }
301     }
302   },
303   "securityDefinitions" : {
304     "basicAuth" : {
305       "description" : "",
306       "type" : "basic"
307     }
308   },
309   "definitions" : {
310     "LegacyOperationalPolicy" : {
311       "type" : "object",
312       "properties" : {
313         "policy-id" : {
314           "type" : "string"
315         },
316         "policy-version" : {
317           "type" : "string"
318         },
319         "content" : {
320           "type" : "string"
321         }
322       }
323     }
324   }
325 }