The partner's usage across its workspaces
Usage summed over the partner's child workspaces. `group_by=day` gives one row per UTC day; `group_by=workspace` gives one row per workspace, named by `external_user_id`, and pages it.
Requires scope: partner
Usage summed over the partner's child workspaces. group_by=day gives one row per UTC day;
group_by=workspace gives one row per workspace, named by external_user_id, and pages it.
The window is from (inclusive) to to (exclusive), default the last 30 days, at most 400 days.
Authorization
bearerAuth Authorization: Bearer <key>. Read the key from the SPICRAWL_API_KEY environment
variable; never hard-code or log it. spicrawl_test_… keys can never spend live
credits. Scopes: scrape, batch, sessions (granted by default), browser
and read (granted deliberately), and partner (only on a partner account's key).
A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.
In: header
Query Parameters
dateExclusive.
date"day"Value in
- "day"
- "workspace"
Workspace grouping only. Descending, ties broken by external_user_id.
"credits"Value in
- "credits"
- "requests"
- "fail_rate"
- "last_active"
Workspace grouping only, 1 to 200.
1 <= value <= 20050Workspace grouping only.
0 <= value0Workspace grouping only. A prefix of external_user_id.
length <= 128Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/v1/partner/usage"{ "period": { "start": "2019-08-24", "end": "2019-08-24", "bounds": "string", "days": 0 }, "group_by": "day", "totals": { "requests": 0, "requests_failed": 0, "credits_micro": 0, "credits_wallet_micro": 0, "credits_own_micro": 0 }, "rows": [ {} ], "page": { "total": 0, "limit": 0, "offset": 0, "next_offset": 0 }}