Supported Periods
This reference lists all valid values for the period
parameter when querying metrics. You can use these to filter data across different time windows.
Common periods
ID | Name |
---|---|
today | Today |
yesterday | Yesterday |
this_week | This week (Mon - Today) |
last_week | Last week (Mon - Sun) |
7d | Last 7 days |
14d | Last 14 days |
30d | Last 30 days |
this_month | This month |
last_month | Last month |
this_quarter | This quarter |
last_quarter | Last quarter |
90d | Last 3 months |
1y | Last 12 months |
2y | Last 24 months |
30min | Last 30 minutes |
24h | Last 24 hours |
Usage
You can pass any of these values as the period
parameter in your metric requests:
curl -G http://localhost:3000/api/metrics/revenue \
-H "Authorization: Bearer {token}" \
-d period=30d
Each metric page also shows example periods in their respective request sections.