Update pap documents
[policy/parent.git] / docs / pap / swagger / deployed-policy-pap.json
1 {
2   "swagger": "2.0",
3   "basePath": "/",
4   "tags": [
5     {
6       "name": "Policy Deployment Status"
7     }
8   ],
9   "schemes": [
10     "http",
11     "https"
12   ],
13   "consumes": [
14     "application/json",
15     "application/yaml"
16   ],
17   "produces": [
18     "application/json",
19     "application/yaml"
20   ],
21   "paths": {
22     "/policy/pap/v1/policies/deployed": {
23       "get": {
24         "tags": [
25           "Policy Deployment Status"
26         ],
27         "summary": "Queries status of all deployed policies",
28         "description": "Queries status of all deployed policies, returning success and failure counts of the PDPs",
29         "operationId": "queryAllDeployedPolicies",
30         "produces": [
31           "application/json",
32           "application/yaml"
33         ],
34         "parameters": [
35           {
36             "name": "X-ONAP-RequestID",
37             "in": "header",
38             "description": "RequestID for http transaction",
39             "required": false,
40             "type": "string",
41             "format": "uuid"
42           }
43         ],
44         "responses": {
45           "200": {
46             "description": "successful operation",
47             "headers": {
48               "X-MinorVersion": {
49                 "type": "string",
50                 "description": "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
51               },
52               "X-PatchVersion": {
53                 "type": "string",
54                 "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"
55               },
56               "X-LatestVersion": {
57                 "type": "string",
58                 "description": "Used only to communicate an API's latest version"
59               },
60               "X-ONAP-RequestID": {
61                 "type": "string",
62                 "format": "uuid",
63                 "description": "Used to track REST transactions for logging purpose"
64               }
65             },
66             "schema": {
67               "type": "array",
68               "items": {
69                 "$ref": "#/definitions/PolicyStatus"
70               }
71             }
72           },
73           "401": {
74             "description": "Authentication Error"
75           },
76           "403": {
77             "description": "Authorization Error"
78           },
79           "500": {
80             "description": "Internal Server Error"
81           }
82         },
83         "security": [
84           {
85             "basicAuth": []
86           }
87         ],
88         "x-interface info": {
89           "api-version": "1.0.0",
90           "last-mod-release": "Dublin"
91         }
92       }
93     },
94     "/policy/pap/v1/policies/deployed/{name}": {
95       "get": {
96         "tags": [
97           "Policy Deployment Status"
98         ],
99         "summary": "Queries status of specific deployed policies",
100         "description": "Queries status of specific deployed policies, returning success and failure counts of the PDPs",
101         "operationId": "queryDeployedPolicies",
102         "produces": [
103           "application/json",
104           "application/yaml"
105         ],
106         "parameters": [
107           {
108             "name": "name",
109             "in": "path",
110             "description": "Policy Id",
111             "required": true,
112             "type": "string"
113           },
114           {
115             "name": "X-ONAP-RequestID",
116             "in": "header",
117             "description": "RequestID for http transaction",
118             "required": false,
119             "type": "string",
120             "format": "uuid"
121           }
122         ],
123         "responses": {
124           "200": {
125             "description": "successful operation",
126             "headers": {
127               "X-MinorVersion": {
128                 "type": "string",
129                 "description": "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
130               },
131               "X-PatchVersion": {
132                 "type": "string",
133                 "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"
134               },
135               "X-LatestVersion": {
136                 "type": "string",
137                 "description": "Used only to communicate an API's latest version"
138               },
139               "X-ONAP-RequestID": {
140                 "type": "string",
141                 "format": "uuid",
142                 "description": "Used to track REST transactions for logging purpose"
143               }
144             },
145             "schema": {
146               "type": "array",
147               "items": {
148                 "$ref": "#/definitions/PolicyStatus"
149               }
150             }
151           },
152           "401": {
153             "description": "Authentication Error"
154           },
155           "403": {
156             "description": "Authorization Error"
157           },
158           "500": {
159             "description": "Internal Server Error"
160           }
161         },
162         "security": [
163           {
164             "basicAuth": []
165           }
166         ],
167         "x-interface info": {
168           "api-version": "1.0.0",
169           "last-mod-release": "Dublin"
170         }
171       }
172     },
173     "/policy/pap/v1/policies/deployed/{name}/{version}": {
174       "get": {
175         "tags": [
176           "Policy Deployment Status"
177         ],
178         "summary": "Queries status of a specific deployed policy",
179         "description": "Queries status of a specific deployed policy, returning success and failure counts of the PDPs",
180         "operationId": "queryDeployedPolicy",
181         "produces": [
182           "application/json",
183           "application/yaml"
184         ],
185         "parameters": [
186           {
187             "name": "name",
188             "in": "path",
189             "description": "Policy Id",
190             "required": true,
191             "type": "string"
192           },
193           {
194             "name": "version",
195             "in": "path",
196             "description": "Policy Version",
197             "required": true,
198             "type": "string"
199           },
200           {
201             "name": "X-ONAP-RequestID",
202             "in": "header",
203             "description": "RequestID for http transaction",
204             "required": false,
205             "type": "string",
206             "format": "uuid"
207           }
208         ],
209         "responses": {
210           "200": {
211             "description": "successful operation",
212             "headers": {
213               "X-MinorVersion": {
214                 "type": "string",
215                 "description": "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
216               },
217               "X-PatchVersion": {
218                 "type": "string",
219                 "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"
220               },
221               "X-LatestVersion": {
222                 "type": "string",
223                 "description": "Used only to communicate an API's latest version"
224               },
225               "X-ONAP-RequestID": {
226                 "type": "string",
227                 "format": "uuid",
228                 "description": "Used to track REST transactions for logging purpose"
229               }
230             },
231             "schema": {
232               "$ref": "#/definitions/PolicyStatus"
233             }
234           },
235           "401": {
236             "description": "Authentication Error"
237           },
238           "403": {
239             "description": "Authorization Error"
240           },
241           "500": {
242             "description": "Internal Server Error"
243           }
244         },
245         "security": [
246           {
247             "basicAuth": []
248           }
249         ],
250         "x-interface info": {
251           "api-version": "1.0.0",
252           "last-mod-release": "Dublin"
253         }
254       }
255     }
256   },
257   "securityDefinitions": {
258     "basicAuth": {
259       "description": "",
260       "type": "basic"
261     }
262   },
263   "definitions": {
264     "ToscaPolicyIdentifier": {
265       "type": "object",
266       "properties": {
267         "name": {
268           "type": "string"
269         },
270         "version": {
271           "type": "string"
272         }
273       }
274     },
275     "ToscaPolicyTypeIdentifier": {
276       "type": "object",
277       "properties": {
278         "name": {
279           "type": "string"
280         },
281         "version": {
282           "type": "string"
283         }
284       }
285     },
286     "PolicyStatus": {
287       "type": "object",
288       "properties": {
289         "policyTypeId": {
290           "type": "string"
291         },
292         "policyTypeVersion": {
293           "type": "string"
294         },
295         "policyId": {
296           "type": "string"
297         },
298         "policyVersion": {
299           "type": "string"
300         },
301         "successCount": {
302           "type": "integer",
303           "format": "int32"
304         },
305         "failureCount": {
306           "type": "integer",
307           "format": "int32"
308         },
309         "incompleteCount": {
310           "type": "integer",
311           "format": "int32"
312         },
313         "policy": {
314           "$ref": "#/definitions/ToscaPolicyIdentifier"
315         },
316         "policyType": {
317           "$ref": "#/definitions/ToscaPolicyTypeIdentifier"
318         }
319       }
320     }
321   }
322 }