Update API swagger to reflect the most recent changes to deployed endpoints
[policy/parent.git] / docs / api / swagger / guard-policy-api.json
1 {
2   "swagger" : "2.0",
3   "basePath" : "/",
4   "tags" : [ {
5     "name" : "Legacy Guard Policy"
6   } ],
7   "schemes" : [ "http", "https" ],
8   "paths" : {
9     "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/latest" : {
10       "get" : {
11         "tags" : [ "Legacy Guard Policy" ],
12         "summary" : "Retrieve the latest version of a particular guard policy",
13         "description" : "Returns the latest version of the specified guard policy",
14         "operationId" : "getLatestVersionOfGuardPolicy",
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 guard 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               "type" : "object",
54               "additionalProperties" : {
55                 "$ref" : "#/definitions/LegacyGuardPolicyOutput"
56               }
57             }
58           },
59           "401" : {
60             "description" : "Authentication Error"
61           },
62           "403" : {
63             "description" : "Authorization Error"
64           },
65           "404" : {
66             "description" : "Resource Not Found"
67           },
68           "500" : {
69             "description" : "Internal Server Error"
70           }
71         },
72         "security" : [ {
73           "basicAuth" : [ ]
74         } ],
75         "x-interface info" : {
76           "api-version" : "1.0.0",
77           "last-mod-release" : "Dublin"
78         }
79       }
80     },
81     "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/deployed" : {
82       "get" : {
83         "tags" : [ "Legacy Guard Policy" ],
84         "summary" : "Retrieve deployed versions of a particular guard policy in pdp groups",
85         "description" : "Returns deployed versions of a specified guard policy in pdp groups",
86         "operationId" : "getDeployedVersionsOfGuardPolicy",
87         "produces" : [ "application/json" ],
88         "parameters" : [ {
89           "name" : "policyId",
90           "in" : "path",
91           "description" : "ID of guard policy",
92           "required" : true,
93           "type" : "string"
94         }, {
95           "name" : "X-ONAP-RequestID",
96           "in" : "header",
97           "description" : "RequestID for http transaction",
98           "required" : false,
99           "type" : "string",
100           "format" : "uuid"
101         } ],
102         "responses" : {
103           "200" : {
104             "description" : "successful operation; Deployed versions of specified guard policy in PDP groups will be returned.",
105             "headers" : {
106               "X-MinorVersion" : {
107                 "type" : "string",
108                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
109               },
110               "X-PatchVersion" : {
111                 "type" : "string",
112                 "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"
113               },
114               "X-LatestVersion" : {
115                 "type" : "string",
116                 "description" : "Used only to communicate an API's latest version"
117               },
118               "X-ONAP-RequestID" : {
119                 "type" : "string",
120                 "format" : "uuid",
121                 "description" : "Used to track REST transactions for logging purpose"
122               }
123             },
124             "schema" : {
125               "type" : "map",
126               "items" : {
127                 "$ref" : "#/definitions/LegacyGuardPolicyOutput"
128               }
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     },
153     "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}" : {
154       "get" : {
155         "tags" : [ "Legacy Guard Policy" ],
156         "summary" : "Retrieve one version of a particular guard policy",
157         "description" : "Returns a particular version of a specified guard policy",
158         "operationId" : "getSpecificVersionOfGuardPolicy",
159         "produces" : [ "application/json" ],
160         "parameters" : [ {
161           "name" : "policyId",
162           "in" : "path",
163           "description" : "ID of policy",
164           "required" : true,
165           "type" : "string"
166         }, {
167           "name" : "policyVersion",
168           "in" : "path",
169           "description" : "Version of policy",
170           "required" : true,
171           "type" : "string"
172         }, {
173           "name" : "X-ONAP-RequestID",
174           "in" : "header",
175           "description" : "RequestID for http transaction",
176           "required" : false,
177           "type" : "string",
178           "format" : "uuid"
179         } ],
180         "responses" : {
181           "200" : {
182             "description" : "successful operation; Specified version of guard policy will be returned.",
183             "headers" : {
184               "X-MinorVersion" : {
185                 "type" : "string",
186                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
187               },
188               "X-PatchVersion" : {
189                 "type" : "string",
190                 "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"
191               },
192               "X-LatestVersion" : {
193                 "type" : "string",
194                 "description" : "Used only to communicate an API's latest version"
195               },
196               "X-ONAP-RequestID" : {
197                 "type" : "string",
198                 "format" : "uuid",
199                 "description" : "Used to track REST transactions for logging purpose"
200               }
201             },
202             "schema" : {
203               "type" : "object",
204               "additionalProperties" : {
205                 "$ref" : "#/definitions/LegacyGuardPolicyOutput"
206               }
207             }
208           },
209           "401" : {
210             "description" : "Authentication Error"
211           },
212           "403" : {
213             "description" : "Authorization Error"
214           },
215           "404" : {
216             "description" : "Resource Not Found"
217           },
218           "500" : {
219             "description" : "Internal Server Error"
220           }
221         },
222         "security" : [ {
223           "basicAuth" : [ ]
224         } ],
225         "x-interface info" : {
226           "api-version" : "1.0.0",
227           "last-mod-release" : "Dublin"
228         }
229       },
230       "delete" : {
231         "tags" : [ "Legacy Guard Policy" ],
232         "summary" : "Delete a particular version of a guard policy",
233         "description" : "Delete a particular version of a guard policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted",
234         "operationId" : "deleteSpecificVersionOfGuardPolicy",
235         "consumes" : [ "application/json" ],
236         "produces" : [ "application/json" ],
237         "parameters" : [ {
238           "name" : "policyId",
239           "in" : "path",
240           "description" : "ID of policy",
241           "required" : true,
242           "type" : "string"
243         }, {
244           "name" : "policyVersion",
245           "in" : "path",
246           "description" : "Version of policy",
247           "required" : true,
248           "type" : "string"
249         }, {
250           "name" : "X-ONAP-RequestID",
251           "in" : "header",
252           "description" : "RequestID for http transaction",
253           "required" : false,
254           "type" : "string",
255           "format" : "uuid"
256         } ],
257         "responses" : {
258           "200" : {
259             "description" : "successful operation; Newly deleted guard policy will be returned.",
260             "headers" : {
261               "X-MinorVersion" : {
262                 "type" : "string",
263                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
264               },
265               "X-PatchVersion" : {
266                 "type" : "string",
267                 "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"
268               },
269               "X-LatestVersion" : {
270                 "type" : "string",
271                 "description" : "Used only to communicate an API's latest version"
272               },
273               "X-ONAP-RequestID" : {
274                 "type" : "string",
275                 "format" : "uuid",
276                 "description" : "Used to track REST transactions for logging purpose"
277               }
278             },
279             "schema" : {
280               "type" : "object",
281               "additionalProperties" : {
282                 "$ref" : "#/definitions/LegacyGuardPolicyOutput"
283               }
284             }
285           },
286           "401" : {
287             "description" : "Authentication Error"
288           },
289           "403" : {
290             "description" : "Authorization Error"
291           },
292           "404" : {
293             "description" : "Resource Not Found"
294           },
295           "409" : {
296             "description" : "Delete Conflict, Rule Violation"
297           },
298           "500" : {
299             "description" : "Internal Server Error"
300           }
301         },
302         "security" : [ {
303           "basicAuth" : [ ]
304         } ],
305         "x-interface info" : {
306           "api-version" : "1.0.0",
307           "last-mod-release" : "Dublin"
308         }
309       }
310     },
311     "/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies" : {
312       "post" : {
313         "tags" : [ "Legacy Guard Policy" ],
314         "summary" : "Create a new guard policy",
315         "description" : "Create a new guard policy. Client should provide entity body of the new guard policy",
316         "operationId" : "createGuardPolicy",
317         "consumes" : [ "application/json" ],
318         "produces" : [ "application/json" ],
319         "parameters" : [ {
320           "name" : "X-ONAP-RequestID",
321           "in" : "header",
322           "description" : "RequestID for http transaction",
323           "required" : false,
324           "type" : "string",
325           "format" : "uuid"
326         }, {
327           "in" : "body",
328           "name" : "body",
329           "description" : "Entity body of policy",
330           "required" : true,
331           "type" : "ToscaServiceTemplate",
332           "schema" : {
333             "$ref" : "#/definitions/LegacyGuardPolicyInput"
334           }
335         } ],
336         "responses" : {
337           "200" : {
338             "description" : "successful operation; Newly created guard policy will be returned.",
339             "headers" : {
340               "X-MinorVersion" : {
341                 "type" : "string",
342                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
343               },
344               "X-PatchVersion" : {
345                 "type" : "string",
346                 "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"
347               },
348               "X-LatestVersion" : {
349                 "type" : "string",
350                 "description" : "Used only to communicate an API's latest version"
351               },
352               "X-ONAP-RequestID" : {
353                 "type" : "string",
354                 "format" : "uuid",
355                 "description" : "Used to track REST transactions for logging purpose"
356               }
357             },
358             "schema" : {
359               "type" : "object",
360               "additionalProperties" : {
361                 "$ref" : "#/definitions/LegacyGuardPolicyOutput"
362               }
363             }
364           },
365           "400" : {
366             "description" : "Invalid Body"
367           },
368           "401" : {
369             "description" : "Authentication Error"
370           },
371           "403" : {
372             "description" : "Authorization Error"
373           },
374           "500" : {
375             "description" : "Internal Server Error"
376           }
377         },
378         "security" : [ {
379           "basicAuth" : [ ]
380         } ],
381         "x-interface info" : {
382           "api-version" : "1.0.0",
383           "last-mod-release" : "Dublin"
384         }
385       }
386     }
387   },
388   "securityDefinitions" : {
389     "basicAuth" : {
390       "description" : "",
391       "type" : "basic"
392     }
393   },
394   "definitions" : {
395     "LegacyGuardPolicyContent" : {
396       "type" : "object",
397       "properties" : {
398         "actor" : {
399           "type" : "string"
400         },
401         "recipe" : {
402           "type" : "string"
403         },
404         "targets" : {
405           "type" : "string"
406         },
407         "clname" : {
408           "type" : "string"
409         },
410         "limit" : {
411           "type" : "string"
412         },
413         "timeWindow" : {
414           "type" : "string"
415         },
416         "timeUnits" : {
417           "type" : "string"
418         },
419         "min" : {
420           "type" : "string"
421         },
422         "max" : {
423           "type" : "string"
424         },
425         "guardActiveStart" : {
426           "type" : "string"
427         },
428         "guardActiveEnd" : {
429           "type" : "string"
430         },
431         "asPropertyMap" : {
432           "type" : "object",
433           "additionalProperties" : {
434             "type" : "string"
435           }
436         }
437       }
438     },
439     "LegacyGuardPolicyOutput" : {
440       "type" : "object",
441       "properties" : {
442         "type" : {
443           "type" : "string"
444         },
445         "version" : {
446           "type" : "string"
447         },
448         "metadata" : {
449           "type" : "object",
450           "additionalProperties" : {
451             "type" : "object"
452           }
453         },
454         "properties" : {
455           "type" : "object",
456           "additionalProperties" : {
457             "$ref" : "#/definitions/LegacyGuardPolicyContent"
458           }
459         }
460       }
461     },
462     "LegacyGuardPolicyInput" : {
463       "type" : "object",
464       "properties" : {
465         "policy-id" : {
466           "type" : "string"
467         },
468         "policy-version" : {
469           "type" : "string"
470         },
471         "content" : {
472           "$ref" : "#/definitions/LegacyGuardPolicyContent"
473         }
474       }
475     }
476   }
477 }