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.
If no start
time is provided, the start time will be set to 21 days prior to the current time.
If no end
time is provided, the current time will be used.
Append tags
to scope the number of lookups to those with matching tag values. E.g. tags=foo,bar
will only count transactions that match foo
and bar
.
Request
Path Parameters
API Key
The API Key to retrieve. Begins ak_
.
Query Parameters
A start date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556452651
.
An start date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556477882
.
A comma separated list of tags to query over.
Useful if you want to specify the circumstances in which the request was made.
If multiple tags are specified, the response will only comprise of requests for which all the tags are satisfied - i.e. searching "foo,bar"
will only query requests which tagged both "foo"
and "bar"
.
Licensee Key
Uniquely identifies a 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"
}
]
}