Add xacml PDP doc
[policy/parent.git] / docs / xacml / swagger.json
1 {
2   "swagger" : "2.0",
3   "info" : {
4     "description" : "Policy Xacml PDP Service",
5     "version" : "Swagger Server",
6     "title" : "",
7     "x-component" : "Policy Framework",
8     "x-planned-retirement-date" : "tbd"
9   },
10   "host" : "Pamelas-MBP-2.client.research.att.com:6969",
11   "basePath" : "/",
12   "tags" : [ {
13     "name" : "Decision"
14   }, {
15     "name" : "Statistics"
16   }, {
17     "name" : "HealthCheck"
18   } ],
19   "schemes" : [ "http", "https" ],
20   "paths" : {
21     "/policy/pdpx/v1/decision" : {
22       "post" : {
23         "tags" : [ "Decision" ],
24         "summary" : "Fetch the decision using specified decision parameters",
25         "description" : "Returns the policy decision from Policy Xacml PDP",
26         "operationId" : "decision",
27         "consumes" : [ "application/json" ],
28         "produces" : [ "application/json" ],
29         "parameters" : [ {
30           "in" : "body",
31           "name" : "body",
32           "required" : false,
33           "schema" : {
34             "$ref" : "#/definitions/DecisionRequest"
35           }
36         }, {
37           "name" : "X-ONAP-RequestID",
38           "in" : "header",
39           "description" : "RequestID for http transaction",
40           "required" : false,
41           "type" : "string",
42           "format" : "uuid"
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               "$ref" : "#/definitions/DecisionResponse"
68             }
69           },
70           "400" : {
71             "description" : "Bad Request",
72             "schema" : {
73               "$ref" : "#/definitions/ErrorResponse"
74             }
75           },
76           "401" : {
77             "description" : "Authentication Error"
78           },
79           "403" : {
80             "description" : "Authorization Error"
81           },
82           "500" : {
83             "description" : "Internal Server Error"
84           }
85         },
86         "security" : [ {
87           "basicAuth" : [ ]
88         } ],
89         "x-interface info" : {
90           "last-mod-release" : "Dublin",
91           "pdpx-version" : "1.0.0"
92         }
93       }
94     },
95     "/policy/pdpx/v1/statistics" : {
96       "get" : {
97         "tags" : [ "Statistics" ],
98         "summary" : "Fetch current statistics",
99         "description" : "Provides current statistics of the Policy Xacml PDP component",
100         "operationId" : "statistics",
101         "consumes" : [ "application/json" ],
102         "produces" : [ "application/json" ],
103         "parameters" : [ {
104           "name" : "X-ONAP-RequestID",
105           "in" : "header",
106           "description" : "RequestID for http transaction",
107           "required" : false,
108           "type" : "string",
109           "format" : "uuid"
110         } ],
111         "responses" : {
112           "200" : {
113             "description" : "successful operation",
114             "headers" : {
115               "X-MinorVersion" : {
116                 "type" : "string",
117                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
118               },
119               "X-PatchVersion" : {
120                 "type" : "string",
121                 "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"
122               },
123               "X-LatestVersion" : {
124                 "type" : "string",
125                 "description" : "Used only to communicate an API's latest version"
126               },
127               "X-ONAP-RequestID" : {
128                 "type" : "string",
129                 "format" : "uuid",
130                 "description" : "Used to track REST transactions for logging purpose"
131               }
132             },
133             "schema" : {
134               "$ref" : "#/definitions/StatisticsReport"
135             }
136           },
137           "401" : {
138             "description" : "Authentication Error"
139           },
140           "403" : {
141             "description" : "Authorization Error"
142           },
143           "500" : {
144             "description" : "Internal Server Error"
145           }
146         },
147         "security" : [ {
148           "basicAuth" : [ ]
149         } ],
150         "x-interface info" : {
151           "last-mod-release" : "Dublin",
152           "pdpx-version" : "1.0.0"
153         }
154       }
155     },
156     "/policy/pdpx/v1/healthcheck" : {
157       "get" : {
158         "tags" : [ "HealthCheck" ],
159         "summary" : "Perform a system healthcheck",
160         "description" : "Provides healthy status of the Policy Xacml PDP component",
161         "operationId" : "healthcheck",
162         "consumes" : [ "application/json" ],
163         "produces" : [ "application/json" ],
164         "parameters" : [ {
165           "name" : "X-ONAP-RequestID",
166           "in" : "header",
167           "description" : "RequestID for http transaction",
168           "required" : false,
169           "type" : "string",
170           "format" : "uuid"
171         } ],
172         "responses" : {
173           "200" : {
174             "description" : "successful operation",
175             "headers" : {
176               "X-MinorVersion" : {
177                 "type" : "string",
178                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
179               },
180               "X-PatchVersion" : {
181                 "type" : "string",
182                 "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"
183               },
184               "X-LatestVersion" : {
185                 "type" : "string",
186                 "description" : "Used only to communicate an API's latest version"
187               },
188               "X-ONAP-RequestID" : {
189                 "type" : "string",
190                 "format" : "uuid",
191                 "description" : "Used to track REST transactions for logging purpose"
192               }
193             },
194             "schema" : {
195               "$ref" : "#/definitions/HealthCheckReport"
196             }
197           },
198           "401" : {
199             "description" : "Authentication Error"
200           },
201           "403" : {
202             "description" : "Authorization Error"
203           },
204           "500" : {
205             "description" : "Internal Server Error"
206           }
207         },
208         "security" : [ {
209           "basicAuth" : [ ]
210         } ],
211         "x-interface info" : {
212           "last-mod-release" : "Dublin",
213           "pdpx-version" : "1.0.0"
214         }
215       }
216     }
217   },
218   "securityDefinitions" : {
219     "basicAuth" : {
220       "description" : "",
221       "type" : "basic"
222     }
223   },
224   "definitions" : {
225     "DecisionResponse" : {
226       "type" : "object",
227       "properties" : {
228         "status" : {
229           "type" : "string"
230         },
231         "advice" : {
232           "type" : "object",
233           "additionalProperties" : {
234             "type" : "object"
235           }
236         },
237         "obligations" : {
238           "type" : "object",
239           "additionalProperties" : {
240             "type" : "object"
241           }
242         },
243         "policies" : {
244           "type" : "object",
245           "additionalProperties" : {
246             "type" : "object"
247           }
248         }
249       }
250     },
251     "ErrorResponse" : {
252       "type" : "object",
253       "properties" : {
254         "responseCode" : {
255           "type" : "string",
256           "enum" : [ "OK", "CREATED", "ACCEPTED", "NO_CONTENT", "RESET_CONTENT", "PARTIAL_CONTENT", "MOVED_PERMANENTLY", "FOUND", "SEE_OTHER", "NOT_MODIFIED", "USE_PROXY", "TEMPORARY_REDIRECT", "BAD_REQUEST", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "PROXY_AUTHENTICATION_REQUIRED", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "LENGTH_REQUIRED", "PRECONDITION_FAILED", "REQUEST_ENTITY_TOO_LARGE", "REQUEST_URI_TOO_LONG", "UNSUPPORTED_MEDIA_TYPE", "REQUESTED_RANGE_NOT_SATISFIABLE", "EXPECTATION_FAILED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "HTTP_VERSION_NOT_SUPPORTED" ]
257         },
258         "errorMessage" : {
259           "type" : "string"
260         },
261         "errorDetails" : {
262           "type" : "array",
263           "items" : {
264             "type" : "string"
265           }
266         },
267         "warningDetails" : {
268           "type" : "array",
269           "items" : {
270             "type" : "string"
271           }
272         }
273       }
274     },
275     "DecisionRequest" : {
276       "type" : "object",
277       "properties" : {
278         "onapName" : {
279           "type" : "string"
280         },
281         "onapComponent" : {
282           "type" : "string"
283         },
284         "onapInstance" : {
285           "type" : "string"
286         },
287         "requestId" : {
288           "type" : "string"
289         },
290         "action" : {
291           "type" : "string"
292         },
293         "resource" : {
294           "type" : "object",
295           "additionalProperties" : {
296             "type" : "object"
297           }
298         }
299       }
300     },
301     "StatisticsReport" : {
302       "type" : "object",
303       "properties" : {
304         "code" : {
305           "type" : "integer",
306           "format" : "int32"
307         },
308         "totalPolicyTypesCount" : {
309           "type" : "integer",
310           "format" : "int64"
311         },
312         "totalPoliciesCount" : {
313           "type" : "integer",
314           "format" : "int64"
315         },
316         "totalErrorCount" : {
317           "type" : "integer",
318           "format" : "int64"
319         },
320         "permitDecisionsCount" : {
321           "type" : "integer",
322           "format" : "int64"
323         },
324         "denyDecisionsCount" : {
325           "type" : "integer",
326           "format" : "int64"
327         },
328         "indeterminantDecisionsCount" : {
329           "type" : "integer",
330           "format" : "int64"
331         },
332         "notApplicableDecisionsCount" : {
333           "type" : "integer",
334           "format" : "int64"
335         }
336       }
337     },
338     "HealthCheckReport" : {
339       "type" : "object",
340       "properties" : {
341         "name" : {
342           "type" : "string"
343         },
344         "url" : {
345           "type" : "string"
346         },
347         "healthy" : {
348           "type" : "boolean"
349         },
350         "code" : {
351           "type" : "integer",
352           "format" : "int32"
353         },
354         "message" : {
355           "type" : "string"
356         }
357       }
358     }
359   }
360 }