f41900c035d3817ac6bf12950bea312d9b5cf83c
[policy/parent.git] / docs / api / swagger / statistics-api.json
1 {
2   "swagger" : "2.0",
3   "basePath" : "/",
4   "tags" : [{
5     "name" : "Statistics"
6   }],
7   "schemes" : [ "http", "https" ],
8   "paths" : { 
9     "/policy/api/v1/statistics" : {
10       "get" : {
11         "tags" : [ "Statistics" ],
12         "summary" : "Retrieve current statistics",
13         "description" : "Returns current statistics including the counters of API invocation",
14         "operationId" : "getStatistics",
15         "produces" : [ "application/json", "application/yaml" ],
16         "parameters" : [ {
17           "name" : "X-ONAP-RequestID",
18           "in" : "header",
19           "description" : "RequestID for http transaction",
20           "required" : false,
21           "type" : "string",
22           "format" : "uuid"
23         } ],
24         "responses" : {
25           "200" : {
26             "description" : "successful operation; All statistics counters of API invocation will be returned.",
27             "headers" : {
28               "X-MinorVersion" : {
29                 "type" : "string",
30                 "description" : "Used to request or communicate a MINOR version back from the client to the server, and from the server back to the client"
31               },
32               "X-PatchVersion" : {
33                 "type" : "string",
34                 "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"
35               },
36               "X-LatestVersion" : {
37                 "type" : "string",
38                 "description" : "Used only to communicate an API's latest version"
39               },
40               "X-ONAP-RequestID" : {
41                 "type" : "string",
42                 "format" : "uuid",
43                 "description" : "Used to track REST transactions for logging purpose"
44               }
45             },
46             "schema" : {
47               "$ref" : "#/definitions/StatisticsReport"
48             }
49           },
50           "401" : {
51             "description" : "Authentication Error"
52           },
53           "403" : {
54             "description" : "Authorization Error"
55           },
56           "500" : {
57             "description" : "Internal Server Error"
58           }
59         },
60         "security" : [ {
61           "basicAuth" : [ ]
62         } ],
63         "x-interface info" : {
64           "api-version" : "1.0.0",
65           "last-mod-release" : "Dublin"
66         }
67       }
68     }
69   },
70   "securityDefinitions" : {
71     "basicAuth" : {
72       "description" : "",
73       "type" : "basic"
74     }
75   },
76   "definitions" : { 
77     "StatisticsReport" : {
78       "type" : "object",
79       "properties" : {
80         "code" : {
81           "type" : "integer",
82           "format" : "int32"
83         },
84         "totalApiCallCount" : {
85           "type" : "integer",
86           "format" : "int64"
87         },
88         "apiCallSuccessCount" : {
89           "type" : "integer",
90           "format" : "int64"
91         },
92         "apiCallFailureCount" : {
93           "type" : "integer",
94           "format" : "int64"
95         },
96         "totalPolicyGetCount" : {
97           "type" : "integer",
98           "format" : "int64"
99         },
100         "totalPolicyPostCount" : {
101           "type" : "integer",
102           "format" : "int64"
103         },
104         "totalPolicyTypeGetCount" : {
105           "type" : "integer",
106           "format" : "int64"
107         },
108         "totalPolicyTypePostCount" : {
109           "type" : "integer",
110           "format" : "int64"
111         },
112         "policyGetSuccessCount" : {
113           "type" : "integer",
114           "format" : "int64"
115         },
116         "policyGetFailureCount" : {
117           "type" : "integer",
118           "format" : "int64"
119         },
120         "policyPostSuccessCount" : {
121           "type" : "integer",
122           "format" : "int64"
123         },
124         "policyPostFailureCount" : {
125           "type" : "integer",
126           "format" : "int64"
127         },
128         "policyTypeGetSuccessCount" : {
129           "type" : "integer",
130           "format" : "int64"
131         },
132         "policyTypeGetFailureCount" : {
133           "type" : "integer",
134           "format" : "int64"
135         },
136         "policyTypePostSuccessCount" : {
137           "type" : "integer",
138           "format" : "int64"
139         },
140         "policyTypePostFailureCount" : {
141           "type" : "integer",
142           "format" : "int64"
143         }
144       }
145     }
146   }
147 }