Skip to main content

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

    key stringrequired

    API Key

    The API Key to retrieve. Begins ak_.

    Example: ak_test

Query Parameters

    Start Time int64

    A start date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556452651.

    Example: 1418556452651
    End Time int64

    An start date/time in the form of a UNIX Timestamp in milliseconds, e.g. 1418556477882.

    Example: 1418556477882
    Tags string

    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".

    Example: foo,bar
    licensee string

    Licensee Key

    Uniquely identifies a licensee.

    Example: sl_hk71kco54zGSGvF9eXXrvvnMOLLNh

Responses

Success

Schema
    result objectrequired
    start stringrequired

    Start date in ISO 8601 format.

    end stringrequired

    End date in ISO 8601 format.

    total int32required

    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.

  • Array [
  • date stringrequired
    count int32required
  • ]
  • code int32required

    Possible values: [2000]

    message stringrequired

    Possible values: [Success]

Loading...