get TPS by API

Hi Team,

I am trying to get the max TPS by using the APIs given in the doc -

http://docs.apigee.com/management/apis/get/organizations/{org_name}/environments/{env_name}/stats/{d...

I am able to get the message count for each API but not able to get the TPS for each API for a given time period.

Below is the CURL i have got

curl -X GET --header "Authorization: Basic (code)=" "https://api.enterprise.apigee.com/v1/organizations/(org_name)/environments/prod/stats/apiproxy?select=tps&timeRange=02%2F17%2F2017%2000%3A00~02%2F17%2F2017%2023%3A59"

Error :

{
  "code": "analytics.dataapi.service.UnableToResolveRequest",
  "message": "Unable to resolve request apiproxy",
  "contexts": []
}

Please let me know how to get TPS for each API in a given time period.

Thanks in advance,

Prashanthi.

1 8 1,404
8 REPLIES 8

It could be that the documentation is not correct, specifically regarding the tps metric.

If I try to query "sum(message_count)" rather than tps, then your query works for me.

Is this enough of a workaround for you?

If not that, then try using 'apis' in place of apiproxy:

curl -X GET --header "Authorization: Basic (code)=" "https://api.enterprise.apigee.com/v1/organizations/(org_name)/environments/prod/stats/apis?select=tps&timeRange=02%2F17%2F2017%2000%3A00~02%2F17%2F2017%2023%3A59"

our team needs details upto second for the heavy uneven traffic spikes. But this gives upto the min only.

Can you try using "apis" and not "apiproxy" in the url path? Like so:

curl -X GET --header "Authorization: Basic (code)=" "https://api.enterprise.apigee.com/v1/organizations/(org_name)/environments/prod/stats/apis?select=tps&timeRange=02%2F17%2F2017%2000%3A00~02%2F17%2F2017%2023%3A59"

Works. Added a filter to fetch only one api &name=ApiProxyName but gives data error.

I think the syntax for restricting to a particular apiproxy is:

filter=(apiproxy in 'api1','api2')

and not

name=apiproxyname

eg

GET "/v1/o/cap500/e/test/stats/apis?select=tps&filter=(apiproxy%20in%20'apiproxyname')&timeRange=..." 

Works with filters as well. But the value is in 0.000xx which over 6 months which and when i see the apigee performance analytics dashboards the tps is generally around 0.1 or sometimes 0.01. Understand why the value decreases over time. hope to get the max ( tps ) or something equivalent to understand the tps during spikes.

Also @s.kesh - are you on the same team as @Prashanthi ?

Definitely not. I know the issue very well.