On a calls-per-quarter plan? See your number of API calls per month.

Want to keep track of the number of calls made to your APIs per month?

Beyond the pure statistics of how your API program is doing overall, API calls also have a financial impact. If you're on a quarterly plan with Apigee, keeping track of your API calls per month, and per quarter, shows you how you're doing against your plan's API calls allowance. (And come on, having too many API calls is usually a good problem to have, right?)

Using the management API, you can easily see the number of API calls made to different organizations and environments per month (or any time period back to six months in the past). Times are in UTC. Here's the API:

  • In SmartDocs
  • In cURL (with %20 URL encoding for spaces):
    curl -v "https://api.enterprise.apigee.com/v1/organizations/{your_org}/environments/{environment}/stats/?select=sum(message_count)&timeRange=03/01/2016%2000:00~03/31/2016%2024:00" -u edge_email
    	

    About the query parameters:

    select=sum(message_count) - Tells the API to get the number of messages.

    timeRange - Lets you specify the time range to get message counts in the following format: MM/DD/YYYY HH:MM, with start and end dates/times separated by a tilde character (~).

Apigee Test: If you're using Apigee Test to make sure your APIs are alive, be aware that those calls are added to your overall API counts.

Getting your spreadsheet on

And if you want to format the JSON response in CSV (spreadsheet format) for aggregation, calculation, and graphs, use a tool like https://json-csv.com/.

Comments
sudheendras
Staff

Hey @Floyd Jones Valuable info! In addition to these options, customers can also login to http://360.apigee.com to see the traffic. Right? Not just that Apigee 360 offers customers a more connected, personalized and self-service experience, allowing them to open and manage support cases, track Apigee Edge traffic etc.

Not applicable

@sudheendra1 you're correct about the use of 360.apigee.com, however it is still in beta, and @Floyd Jones's method is the most reliable.

Version history
Last update:
‎03-09-2016 02:36 PM
Updated by: