bandwidth
Get analytics on bandwidth 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 bandwidth
method will sort results by highest number of bandwidth, but will also include requests
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 bandwidth for all CIDs
Filter by passing an argument
fileName
- Type:
string
Returns bandwidth for all file names
Filter by passing an argument
userAgent
- Type:
string
Returns bandwidth for user agents
Filter by passing an argument
country
- Type:
string
Returns bandwidth for countries
Filter by passing an argument
region
- Type:
string
Returns bandwidth for regions inside of countries
Filter by passing an argument
referer
- Type:
string
Returns bandwidth 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