spicrawlspicrawlDocs
Partner

List the partner's workspaces

Pages the workspaces this partner provisioned. Items carry no `api_key`.

Requires scope: partner

GET
/v1/partner/workspaces

Pages the workspaces this partner provisioned. Items carry no api_key. Each item has its usage figures (see PartnerWorkspace). sort=external_user_id (the default) pages by keyset: next_after is present when the page is full; pass it as after. sort=wallet_used orders by the balance spend this window, largest first, and pages by offset: next_offset is present when the page is full. The wallet_used sort is on usage records, which trail the live figure by about 60 seconds. It is computed over all of the partner's workspaces, not only the page, so it is slower than the default sort, and noticeably slower for a very large account.

q matches a workspace whose external_user_id starts with it (case-sensitive) or whose display_name starts with it (case-insensitive). It is up to 100 characters with no control characters. There are no wildcards: %, _ and * match themselves. Other characters match display names only.

Authorization

bearerAuth
AuthorizationBearer <token>

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

limit?integer

Page size, 1 to 200.

Range1 <= value <= 200
Default50
after?string

The next_after of the previous page. Only with sort=external_user_id.

Match^[A-Za-z0-9._:-]{1,128}$
Lengthlength <= 128
q?string

A prefix of external_user_id (case-sensitive) or of display_name (case-insensitive). Matches all when absent. Up to 100 characters, no control characters.

Lengthlength <= 100
sort?string

external_user_id (default) or wallet_used (descending by this window's balance spend).

Default"external_user_id"

Value in

  • "external_user_id"
  • "wallet_used"
offset?integer

Rows to skip. Only with sort=wallet_used; next_offset of the previous page.

Range0 <= value
Default0

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/partner/workspaces"
{  "workspaces": [    {      "workspace_id": "string",      "external_user_id": "string",      "display_name": "string",      "status": "active",      "created_at": "2019-08-24T14:15:22Z",      "free_credits": 0,      "wallet_cap": 0,      "tier": {        "id": "string",        "name": "string"      },      "requests_per_minute": 1,      "concurrency": 1,      "wallet_cap_source": "tier",      "window_resets_at": "2019-08-24T14:15:22Z",      "wallet_used": 0,      "wallet_used_source": "live",      "free_used": 0,      "own_credits": 0    }  ],  "next_after": "string",  "next_offset": 0}