Update info yaml in policy-parent
[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", "application/yaml" ],
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/deployed" : {
79       "get" : {
80         "tags" : [ "Legacy Opereational Policy" ],
81         "summary" : "Retrieve deployed versions of a particular operational policy in pdp groups",
82         "description" : "Returns deployed versions of a specified operational policy in pdp groups",
83         "operationId" : "getDeployedVersionsOfOperationalPolicy",
84         "produces" : [ "application/json", "application/yaml" ],
85         "parameters" : [ {
86           "name" : "policyId",
87           "in" : "path",
88           "description" : "ID of operational policy",
89           "required" : true,
90           "type" : "string"
91         }, {
92           "name" : "X-ONAP-RequestID",
93           "in" : "header",
94           "description" : "RequestID for http transaction",
95           "required" : false,
96           "type" : "string",
97           "format" : "uuid"
98         } ],
99         "responses" : {
100           "200" : {
101             "description" : "successful operation; Deployed versions of specified operational policy in PDP groups will be returned.",
102             "headers" : {
103               "X-MinorVersion" : {
104                 "type" : "string",
105                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
106               },
107               "X-PatchVersion" : {
108                 "type" : "string",
109                 "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"
110               },
111               "X-LatestVersion" : {
112                 "type" : "string",
113                 "description" : "Used only to communicate an API's latest version"
114               },
115               "X-ONAP-RequestID" : {
116                 "type" : "string",
117                 "format" : "uuid",
118                 "description" : "Used to track REST transactions for logging purpose"
119               }
120             },
121             "schema" : {
122               "type" : "array",
123               "items" : {
124                 "$ref" : "#/definitions/LegacyOperationalPolicy"
125               }
126             }
127           },
128           "401" : {
129             "description" : "Authentication Error"
130           },
131           "403" : {
132             "description" : "Authorization Error"
133           },
134           "404" : {
135             "description" : "Resource Not Found"
136           },
137           "500" : {
138             "description" : "Internal Server Error"
139           }
140         },
141         "security" : [ {
142           "basicAuth" : [ ]
143         } ],
144         "x-interface info" : {
145           "api-version" : "1.0.0",
146           "last-mod-release" : "Dublin"
147         }
148       }
149     },
150     "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : {
151       "get" : {
152         "tags" : [ "Legacy Operational Policy" ],
153         "summary" : "Retrieve one version of a particular operational policy",
154         "description" : "Returns a particular version of a specified operational policy",
155         "operationId" : "getSpecificVersionOfOperationalPolicy",
156         "produces" : [ "application/json", "application/yaml" ],
157         "parameters" : [ {
158           "name" : "policyId",
159           "in" : "path",
160           "description" : "ID of policy",
161           "required" : true,
162           "type" : "string"
163         }, {
164           "name" : "policyVersion",
165           "in" : "path",
166           "description" : "Version of policy",
167           "required" : true,
168           "type" : "string"
169         }, {
170           "name" : "X-ONAP-RequestID",
171           "in" : "header",
172           "description" : "RequestID for http transaction",
173           "required" : false,
174           "type" : "string",
175           "format" : "uuid"
176         } ],
177         "responses" : {
178           "200" : {
179             "description" : "successful operation; Specified version of specified operational policy will be returned.",
180             "headers" : {
181               "X-MinorVersion" : {
182                 "type" : "string",
183                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
184               },
185               "X-PatchVersion" : {
186                 "type" : "string",
187                 "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"
188               },
189               "X-LatestVersion" : {
190                 "type" : "string",
191                 "description" : "Used only to communicate an API's latest version"
192               },
193               "X-ONAP-RequestID" : {
194                 "type" : "string",
195                 "format" : "uuid",
196                 "description" : "Used to track REST transactions for logging purpose"
197               }
198             },
199             "schema" : {
200               "$ref" : "#/definitions/LegacyOperationalPolicy"
201             }
202           },
203           "401" : {
204             "description" : "Authentication Error"
205           },
206           "403" : {
207             "description" : "Authorization Error"
208           },
209           "404" : {
210             "description" : "Resource Not Found"
211           },
212           "500" : {
213             "description" : "Internal Server Error"
214           }
215         },
216         "security" : [ {
217           "basicAuth" : [ ]
218         } ],
219         "x-interface info" : {
220           "api-version" : "1.0.0",
221           "last-mod-release" : "Dublin"
222         }
223       },
224       "delete" : {
225         "tags" : [ "Legacy Operational Policy" ],
226         "summary" : "Delete a particular version of a specified operational policy",
227         "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",
228         "operationId" : "deleteSpecificVersionOfOperationalPolicy",
229         "produces" : [ "application/json", "application/yaml" ],
230         "parameters" : [ {
231           "name" : "policyId",
232           "in" : "path",
233           "description" : "ID of policy",
234           "required" : true,
235           "type" : "string"
236         }, {
237           "name" : "policyVersion",
238           "in" : "path",
239           "description" : "Version of policy",
240           "required" : true,
241           "type" : "string"
242         }, {
243           "name" : "X-ONAP-RequestID",
244           "in" : "header",
245           "description" : "RequestID for http transaction",
246           "required" : false,
247           "type" : "string",
248           "format" : "uuid"
249         } ],
250         "responses" : {
251           "200" : {
252             "description" : "successful operation; Newly deleted operational policy will be returned.",
253             "headers" : {
254               "X-MinorVersion" : {
255                 "type" : "string",
256                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
257               },
258               "X-PatchVersion" : {
259                 "type" : "string",
260                 "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"
261               },
262               "X-LatestVersion" : {
263                 "type" : "string",
264                 "description" : "Used only to communicate an API's latest version"
265               },
266               "X-ONAP-RequestID" : {
267                 "type" : "string",
268                 "format" : "uuid",
269                 "description" : "Used to track REST transactions for logging purpose"
270               }
271             },
272             "schema" : {
273               "$ref" : "#/definitions/LegacyOperationalPolicy"
274             }
275           },
276           "401" : {
277             "description" : "Authentication Error"
278           },
279           "403" : {
280             "description" : "Authorization Error"
281           },
282           "404" : {
283             "description" : "Resource Not Found"
284           },
285           "409" : {
286             "description" : "Delete Conflict, Rule Violation"
287           },
288           "500" : {
289             "description" : "Internal Server Error"
290           }
291         },
292         "security" : [ {
293           "basicAuth" : [ ]
294         } ],
295         "x-interface info" : {
296           "api-version" : "1.0.0",
297           "last-mod-release" : "Dublin"
298         }
299       }
300     },
301     "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" : {
302       "post" : {
303         "tags" : [ "Legacy Operational Policy" ],
304         "summary" : "Create a new operational policy",
305         "description" : "Create a new operational policy. Client should provide entity body of the new operational policy",
306         "operationId" : "createOperationalPolicy",
307         "consumes" : [ "application/json", "application/yaml" ],
308         "produces" : [ "application/json", "application/yaml" ],
309         "parameters" : [ {
310           "name" : "X-ONAP-RequestID",
311           "in" : "header",
312           "description" : "RequestID for http transaction",
313           "required" : false,
314           "type" : "string",
315           "format" : "uuid"
316         }, {
317           "in" : "body",
318           "name" : "body",
319           "description" : "Entity body of policy",
320           "required" : true,
321           "type" : "ToscaServiceTemplate",
322           "schema" : {
323             "$ref" : "#/definitions/LegacyOperationalPolicy"
324           }
325         } ],
326         "responses" : {
327           "200" : {
328             "description" : "successful operation; Newly created operational policy will be returned.",
329             "headers" : {
330               "X-MinorVersion" : {
331                 "type" : "string",
332                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
333               },
334               "X-PatchVersion" : {
335                 "type" : "string",
336                 "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"
337               },
338               "X-LatestVersion" : {
339                 "type" : "string",
340                 "description" : "Used only to communicate an API's latest version"
341               },
342               "X-ONAP-RequestID" : {
343                 "type" : "string",
344                 "format" : "uuid",
345                 "description" : "Used to track REST transactions for logging purpose"
346               }
347             },
348             "schema" : {
349               "$ref" : "#/definitions/LegacyOperationalPolicy"
350             }
351           },
352           "400" : {
353             "description" : "Invalid Body"
354           },
355           "401" : {
356             "description" : "Authentication Error"
357           },
358           "403" : {
359             "description" : "Authorization Error"
360           },
361           "406" : {
362             "description" : "Not Acceptable Version"
363           },
364           "500" : {
365             "description" : "Internal Server Error"
366           }
367         },
368         "security" : [ {
369           "basicAuth" : [ ]
370         } ],
371         "x-interface info" : {
372           "api-version" : "1.0.0",
373           "last-mod-release" : "Dublin"
374         }
375       }
376     }
377   },
378   "securityDefinitions" : {
379     "basicAuth" : {
380       "description" : "",
381       "type" : "basic"
382     }
383   },
384   "definitions" : {
385     "LegacyOperationalPolicy" : {
386       "type" : "object",
387       "properties" : {
388         "policy-id" : {
389           "type" : "string"
390         },
391         "policy-version" : {
392           "type" : "string"
393         },
394         "content" : {
395           "type" : "string"
396         }
397       }
398     }
399   }
400 }