Get API Metrics
This API will help retreive a summary of API usage volume made by user, including a total count and a daily breakdown, for a specific API path within the last 30 days. The data is filtered based on the API keys associated with the current user's company.
Rate Limit
1 request per second
Format Supported
JSON
Authenticated Resource
API Key
curl --location 'https://api.fourkites.com/api-usage-metrics?startDate=16/06/25&apiPath=/shipments' \
--header 'apikey: REPLACE_KEY_VALUE'curl --location 'https://api.fourkites.com/api-usage-metrics?startDate=16/06/25&apiPath=/shipments' \
--header 'apikey: REPLACE_KEY_VALUE'Request Attribute
Parameter | Param Type | Format | Required | Default | Description |
|---|---|---|---|---|---|
startDate | Query | String | No | The default value is -30 days from the current date. | The start date for the metrics query, in dd/mm/yy format. The date must be within the last 30 days. |
apiPath | Query | String | No | /shipments | The specific API path to fetch metrics for (e.g., /shipments, /api/v1/tracking). |
Response Attributes
The endpoint returns a JSON object containing the total request count and a map of daily counts.
Name | Format | Default | Description |
|---|---|---|---|
totalRequests | Long | NA | The total number of API requests made within the specified date range and for the given apiPath. |
dailyCounts | Map | NA | A map where each key is a date string (YYYY-MM-DD) and the value is the number of requests made on that day. |
