requests
Get analytics on requests for multiple properties
Usage
The analytics
class is unique in that it very flexible, but also can require more queries to be used well. Be sure to real the Parameters in detail to understand how it can be used.
The requests
method will sort results by highest number of requests, but will also include bandwidth
values.
Returns
What is returned in value
will depend on they property or query used. For instance, using cid()
will return CIDs, country()
will return Countries, etc.
Parameters
Filter response with the following additional methods. It does require at least one property, such as cid
, fileName
, userAgent
, country
, region
, or referrer
.
cid
- Type:
string
Returns requests for all CIDs
Filter by passing an argument
fileName
- Type:
string
Returns requests for all file names
Filter by passing an argument
userAgent
- Type:
string
Returns requests for user agents
Filter by passing an argument
country
- Type:
string
Returns requests for countries
Filter by passing an argument
region
- Type:
string
Returns requests for regions inside of countries
Filter by passing an argument
referer
- Type:
string
Returns requests for referers
Filter by passing an argument
days
- Type:
number
Number of days to query. Starts with current date and then goes back by provided number.
sort
- Type:
"asc" | "desc"
Order results either ascending or descending by created date
limit
- Type:
number
Limit the number of results
customDates
- Type:
string, string
Custom dates to query using a start and end date with the format YYYY-MM-DD
from
- Type:
string
Provide an alternate Gateway domain to query instead of the default one found in the Pinata SDK Config