spicrawlspicrawlDocs
Partner

Suspend a workspace

Sets the workspace to `suspended` with the reason "suspended by partner".

Requires scope: partner

POST
/v1/partner/workspaces/{external_user_id}/suspend

Sets the workspace to suspended with the reason "suspended by partner". Its key is refused on the API. Idempotent. A workspace already suspended (by the partner or by Spicrawl) is returned as it stands: a Spicrawl suspension keeps its reason. A closed workspace is 409 ERR::REQUEST::CONFLICT.

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

Path Parameters

external_user_id*string
Match^[A-Za-z0-9._:-]{1,128}$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/partner/workspaces/string/suspend"
{  "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}