curl --request GET \
--url https://api.whop.com/api/v1/stats/metric \
--header 'Authorization: Bearer <token>'{
"columns": [
"<string>"
],
"data": [
{}
],
"debug": {
"engine": "<string>",
"request_id": "<string>",
"sql": "<string>"
},
"node": "<string>",
"pagination": {
"next_cursor": "<string>"
},
"typename": "<string>"
}Query an aggregated metric. Returns data grouped by period with optional breakdowns.
Required permissions:
stats:readcurl --request GET \
--url https://api.whop.com/api/v1/stats/metric \
--header 'Authorization: Bearer <token>'{
"columns": [
"<string>"
],
"data": [
{}
],
"debug": {
"engine": "<string>",
"request_id": "<string>",
"sql": "<string>"
},
"node": "<string>",
"pagination": {
"next_cursor": "<string>"
},
"typename": "<string>"
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:new_users').
Time granularity (daily, weekly, monthly).
Columns to break down the metric by.
Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.
Key-value pairs to filter the data.
IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. Only applies to ClickHouse metrics.
Start of time range (unix timestamp).
"2023-12-01T05:00:00.401Z"
End of time range (unix timestamp).
"2023-12-01T05:00:00.401Z"
Scope query to a specific company.
"biz_xxxxxxxxxxxxxx"
Scope query to a specific user.
"user_xxxxxxxxxxxxx"
A successful response
Result from a stats query (raw, metric, or SQL).
Column names in the order they appear in each data row.
Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.
Array of data rows, where each row is an array of values matching the columns order.
Debug information including engine and SQL.
Show child attributes
The node path that was queried.
Pagination information.
Show child attributes
The typename of this object
"Result"Was this page helpful?