The documentation page at: http://apigee.com/docs/analytics-services/content/use-analytics-api-measure-api-program-performance mentions: To get statistics for APIs (or any other dimension) across all environments, a wildcard URI pattern is supported:
https://api.enterprise.apigee.com/v1/o/{org_name}/environments/*/stats/apis
However, when I tried this out I encountered the following error.
{ "code": "Please specify exact environment - * in context of environment is not supported. ", "message": "Please specify exact environment - * in context of environment is not supported. ", "contexts": [] }
The endpoint that I used was: https://api.enterprise.apigee.com/v1/o/{myorg}/environments/*/stats/apis?select=sum(message_count)&t...
Any thoughts?
Solved! Go to Solution.
Hi @Cladius Fernando - I think this is a documentation issue. AFAIK Analytics API always expect an environment as part of the URL. If you want to get analytics across environments, you will have to write a simple script to fetch all environments and then loop through each one of them individually. However I agree that an API across environments would really help.
We can get the analytics provisioning status by comma separated list of environments. Similar approach is not working for stats api
https://api.enterprise.apigee.com/v1/o/{org_name}/environments/test,prod/provisioning/axstatus
Hi @Cladius Fernando - I think this is a documentation issue. AFAIK Analytics API always expect an environment as part of the URL. If you want to get analytics across environments, you will have to write a simple script to fetch all environments and then loop through each one of them individually. However I agree that an API across environments would really help.
, sorry for the confusion! That was a doc bug. We've removed that content.
Hi @sudheendra1, thanks for confirming my suspicions. Yes, that's what I had already done for now (i.e. making a separate call for each environment and adding up the numbers) to work around the limitation. Could you please log an enhancement request for the consolidated-stats api?
Thanks @Floyd Jones, for correcting the documentation. There is another section that needs to be corrected in the same article which says:
The following dimensions are supported: /apis, /apiproducts, /apps, /devs, /envs
The dimension "envs" is not supported (the remaining 4 are working properly). [Actually since the endpoint already requires the environment name in the url, this dimension would not be applicable here.]
Yes, I have already posted the enhancement request. Thanks!
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |