Usage Stats
GET/keys/:key/usage
Reports the number of lookups consumed on a key for a range of days.
A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
Request
Path Parameters
Query Parameters
A start date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556452651
. If no start time is provided, the start time will be assigned to a time 21 days prior to the end time.
An end date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556452651
. If no end time is provided, the current time will be used.
Sublicensed keys only. This will restrict the analysed dataset to a specific licensee.
Responses
- 200
- 400
Success
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
result objectrequired
Start date in ISO 8601 format.
End date in ISO 8601 format.
Total of paid lookups performed in specified period.
dailyCount object[]required
An array of objects representing number of paid lookups made on specific days, ordered by date. Each object contains a date
attribute, which represents the day and a count
attribute, which represents the number of paid lookups made on that day.
Possible values: [2000
]
Possible values: [Success
]
{
"result": {
"start": "2015-01-22T15:08:06.609Z",
"end": "2015-01-23T15:08:06.609Z",
"total": 132,
"dailyCount": [
{
"date": "2015-01-22T00:00:00.000Z",
"count": 132
}
]
},
"code": 2000,
"message": "Success"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
API Response Code. Non 2xxx
code indicates a failure. This code will provide a more specific reason when a failure occurs and facilitates debugging.
Human readable error message supplied with every error response.
errors object[]
Indicates location of error in request query or URL parameter
Indicates location of error in request query or URL parameter
{
"code": 0,
"message": "string",
"errors": [
{
"message": "should have required property 'type'",
"path": ".query.type",
"errorCode": "required.openapi.validation"
}
]
}