spicrawlspicrawlDocs
Fleet

List the deployment's workers, grouped by kind

Reports deployment shape: for each worker kind (`browser`, `egress`, `extract`, `batch`, always in that order and always all four), how many workers are publishing, how many are ready, and each one's load.

Requires scope: none (any valid key)

GET
/v1/workers

Reports deployment shape: for each worker kind (browser, egress, extract, batch, always in that order and always all four), how many workers are publishing, how many are ready, and each one's load. Contains no tenant data. Any valid key may call it.

Use it to explain queuing or ERR::ENGINE::UNAVAILABLE: a kind with present: 0 or ready: 0 cannot take work. last_seen_ms is an age; a large value means the worker stopped publishing.

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). A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.

In: header

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/workers"
{  "kinds": [    {      "kind": "browser",      "present": 1,      "ready": 1,      "workers": [        {          "worker_id": "browser-7f9c",          "kind": "browser",          "capacity": 4,          "in_flight": 1,          "free_slots": 3,          "ready": true,          "task_stream": "tasks:browser",          "address": "192.0.2.21:50052",          "last_seen_ms": 812        }      ]    },    {      "kind": "egress",      "present": 0,      "ready": 0,      "workers": []    },    {      "kind": "extract",      "present": 0,      "ready": 0,      "workers": []    },    {      "kind": "batch",      "present": 0,      "ready": 0,      "workers": []    }  ]}