1298fffa9d6b8c3449a082ef1e1df4f3398eaf4c
[policy/parent.git] / docs / pap / swagger / group-pap.json
1 {
2   "swagger" : "2.0",
3   "basePath" : "/",
4   "tags" : [ {
5     "name" : "PdpGroupDeploy"
6   } ],
7   "schemes" : [ "http", "https" ],
8   "consumes" : [ "application/json" ],
9   "produces" : [ "application/json" ],
10   "paths" : {
11     "/policy/pap/v1/pdps" : {
12       "post" : {
13         "tags" : [ "PdpGroupDeploy" ],
14         "summary" : "Deploy or update PDP Groups",
15         "description" : "Deploys or updates a PDP Group, returning optional error details",
16         "operationId" : "deployGroup",
17         "produces" : [ "application/json" ],
18         "parameters" : [ {
19           "name" : "X-ONAP-RequestID",
20           "in" : "header",
21           "description" : "RequestID for http transaction",
22           "required" : false,
23           "type" : "string",
24           "format" : "uuid"
25         }, {
26           "in" : "body",
27           "name" : "body",
28           "description" : "List of PDP Group Configuration",
29           "required" : true,
30           "schema" : {
31             "$ref" : "#/definitions/PdpGroups"
32           }
33         } ],
34         "responses" : {
35           "200" : {
36             "description" : "successful operation",
37             "headers" : {
38               "X-MinorVersion" : {
39                 "type" : "string",
40                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
41               },
42               "X-PatchVersion" : {
43                 "type" : "string",
44                 "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"
45               },
46               "X-LatestVersion" : {
47                 "type" : "string",
48                 "description" : "Used only to communicate an API's latest version"
49               },
50               "X-ONAP-RequestID" : {
51                 "type" : "string",
52                 "format" : "uuid",
53                 "description" : "Used to track REST transactions for logging purpose"
54               }
55             },
56             "schema" : {
57               "$ref" : "#/definitions/PdpGroupDeployResponse"
58             }
59           },
60           "401" : {
61             "description" : "Authentication Error"
62           },
63           "403" : {
64             "description" : "Authorization Error"
65           },
66           "500" : {
67             "description" : "Internal Server Error"
68           }
69         },
70         "security" : [ {
71           "basicAuth" : [ ]
72         } ],
73         "x-interface info" : {
74           "api-version" : "1.0.0",
75           "last-mod-release" : "Dublin"
76         }
77       }
78     }
79   },
80   "securityDefinitions" : {
81     "basicAuth" : {
82       "description" : "",
83       "type" : "basic"
84     }
85   },
86   "definitions" : {
87     "Pdp" : {
88       "type" : "object",
89       "properties" : {
90         "instanceId" : {
91           "type" : "string"
92         },
93         "pdpState" : {
94           "type" : "string",
95           "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
96         },
97         "healthy" : {
98           "type" : "string",
99           "enum" : [ "HEALTHY", "NOT_HEALTHY", "TEST_IN_PROGRESS", "UNKNOWN" ]
100         },
101         "message" : {
102           "type" : "string"
103         }
104       }
105     },
106     "PdpGroup" : {
107       "type" : "object",
108       "properties" : {
109         "name" : {
110           "type" : "string"
111         },
112         "description" : {
113           "type" : "string"
114         },
115         "pdpGroupState" : {
116           "type" : "string",
117           "enum" : [ "PASSIVE", "SAFE", "TEST", "ACTIVE", "TERMINATED" ]
118         },
119         "properties" : {
120           "type" : "object",
121           "additionalProperties" : {
122             "type" : "string"
123           }
124         },
125         "pdpSubgroups" : {
126           "type" : "array",
127           "items" : {
128             "$ref" : "#/definitions/PdpSubGroup"
129           }
130         }
131       }
132     },
133     "PdpGroups" : {
134       "type" : "object",
135       "properties" : {
136         "groups" : {
137           "type" : "array",
138           "items" : {
139             "$ref" : "#/definitions/PdpGroup"
140           }
141         }
142       }
143     },
144     "PdpSubGroup" : {
145       "type" : "object",
146       "properties" : {
147         "pdpType" : {
148           "type" : "string"
149         },
150         "supportedPolicyTypes" : {
151           "type" : "array",
152           "items" : {
153             "$ref" : "#/definitions/ToscaPolicyTypeIdentifier"
154           }
155         },
156         "policies" : {
157           "type" : "array",
158           "items" : {
159             "$ref" : "#/definitions/ToscaPolicyIdentifier"
160           }
161         },
162         "currentInstanceCount" : {
163           "type" : "integer",
164           "format" : "int32"
165         },
166         "desiredInstanceCount" : {
167           "type" : "integer",
168           "format" : "int32"
169         },
170         "properties" : {
171           "type" : "object",
172           "additionalProperties" : {
173             "type" : "string"
174           }
175         },
176         "pdpInstances" : {
177           "type" : "array",
178           "items" : {
179             "$ref" : "#/definitions/Pdp"
180           }
181         }
182       }
183     },
184     "ToscaPolicyIdentifier" : {
185       "type" : "object",
186       "properties" : {
187         "name" : {
188           "type" : "string"
189         },
190         "version" : {
191           "type" : "string"
192         }
193       }
194     },
195     "ToscaPolicyTypeIdentifier" : {
196       "type" : "object",
197       "properties" : {
198         "name" : {
199           "type" : "string"
200         },
201         "version" : {
202           "type" : "string"
203         }
204       }
205     },
206     "PdpGroupDeployResponse" : {
207       "type" : "object",
208       "properties" : {
209         "errorDetails" : {
210           "type" : "string"
211         }
212       }
213     },
214     "ToscaPolicyIdentifierOptVersion" : {
215       "type" : "object",
216       "properties" : {
217         "name" : {
218           "type" : "string"
219         },
220         "version" : {
221           "type" : "string"
222         }
223       }
224     }
225   }
226 }