Developer Resources

GetApiUsage

Get a summary of the API usage for your key.

URL

https://developer.cumtd.com/api/{version}/{format}/GetApiUsage

Remarks

These results show how many requests were made by your API key within the date range specified. The results are broken down by day, then by API version, and finally by API method. For your convenience, the total number of method calls is aggregated at each level.

The four optional parameters (method, version, start_date, and end_date) act as filters; using them effectively just returns a subset of the data that you would obtain by not specifying any parameters. In order to conserve CPU and network resources, though, we encourage you to use these filters whenever you can.

The default date range begins on February 7, 2013 and ends “yesterday”. (February 7, 2013 is the day we began using Google Analytics to track API usage.) Data is not available for dates earlier than 2/7/13 or later than yesterday, and specifying a start_date or end_date outside this range will result in a 400 error.

Parameters

key (required) your API key
method (optional) a single API method for which you want data (e.g. GetDeparturesByStop)
version (optional) a single API version for which you want data (e.g. 2.1)
start_date (optional) the first day for which you want data, in YYYY-MM-DD format (cannot be earlier than 2013-02-07)
end_date (optional) the last day for which you want data, in YYYY-MM-DD format (cannot be later than yesterday)

Response

date a date in YYYY-MM-DD format
calls the number of requests made to a method
versions a list of versions of the API that were used on a given date
number an API version number
methods a list of API methods that were used on a given date and within a given API version
name the name of an API method

Sample