Is it possible to retrieve the custom report generated data via api? I am able to see what reports are available, and the report configuration using the following
https://api.enterprise.apigee.com/v1/organizations/{org_name}/reports/{report_UUID}
... but I haven't found how to get the data from a report for a particular timeframe. Am I missing something?
Thanks!
Hi @brendanhickey, Is that /reports/report_id working for you?
I tried on my org but I see the below response for all the reports
JAXBException occurred : 1 counts of IllegalAnnotationExceptions.
Not sure if thats just with my org or a bug.
However if that works, you should a response like below or you can get it from the network calls made by the browser when you open the report in the management UI.
"chartType" : "column", "comments" : [ ], "createdAt" : 1452125646894, "createdBy" : "BRoles", "dimensions" : [ "apiproxy", "request_verb", "proxy_pathsuffix" ], "displayName" : "WalAPI", "environment" : "prd01", "filter" : "", "lastModifiedAt" : 1476220665872, "lastModifiedBy" : "10.234.122.13", "lastViewedAt" : 1494653974715, "metrics" : [ { "function" : "avg", "name" : "total_response_time" }, { "function" : "avg", "name" : "target_response_time" }, { "function" : "avg", "name" : "request_processing_latency" }, { "function" : "avg", "name" : "response_processing_latency" }, { "function" : "sum", "name" : "message_count" }, { "function" : "sum", "name" : "is_error" } ], "name" : "7b81a847-cf7e-40cf-a78f-021c530952", "organization" : "prod", "properties" : [ { "property" : "__ui__", "value" : [ { "name" : "description" }, { "name" : "accuracy" } ] } ], "sortbyCols" : [ ], "tags" : [ ], "timeUnit" : "hour"
That reportAPI is to get the definition but not for the data. If you want to get the data what you see in the UI for a time frame, you need to call multiple APIs as below per each dimension
curl -v "https://api.enterprise.apigee.com/v1/organizations/{org}/environments/{environment}/stats/apiproxy?select=avg(total_response_time),avg(target_response_time),avg(request_processing_latency),avg(response_processing_latency),sum(message_count),sum(is_error)&sort=ASC&sortby=avg(total_response_time),avg(target_response_time),avg(request_processing_latency),avg(response_processing_latency),sum(message_count),sum(is_error)&timeRange=05%2F12%2F2017+21:36:00~05%2F12%2F2017+22:36:00&timeUnit=minute
and then use a filter as below for the next level dimensions
curl -v "https://api.enterprise.apigee.com/v1/organizations/{org}/environments/{environment}/stats/request_verb?filter=(apiproxy+eq+%27TestAPI%27)&select=avg(total_response_time),avg(target_response_time),avg(request_processing_latency),avg(response_processing_latency),sum(message_count),sum(is_error)&sort=ASC&sortby=avg(total_response_time),avg(target_response_time),avg(request_processing_latency),avg(response_processing_latency),sum(message_count),sum(is_error)&timeRange=05%2F12%2F2017+21:37:00~05%2F12%2F2017+22:37:00&timeUnit=minute
Here is the link to help you construct curls to get the data you want
http://docs.apigee.com/analytics-services/content/use-analytics-api-measure-api-program-performance
Update: /reports/reportsUUID works if you use curl but not in the browser for now.
Raising a ticket to get that fixed.
please sombody answer this question
Add how to retrieve data per report and per dimension
https://api.enterprise.apigee.com/v1/organizations/{org_name}/environments/{env}/stats/metricname?se...
eq 'cmis-apigeetest')&timeRange=12/05/2019 23:50~12/10/2019
23:50&sortby=sum(message_count)
I have tried this one but i need data based on particular report can somebody help me to resolve this issue?
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |