Provision a one-time managed CDP relay for an isolated workflow run

Provision a one-time managed CDP relay for an isolated workflow run

POST
/api/v1/browser/projects/{projectId}/environments/{environmentId}/workflows/{workflowId}/cdp-sessions

Provision a one-time managed CDP relay for an isolated workflow run

Authorization

BrowserWorkflowApiKey
headerX-API-Key<token>

Project- and environment-scoped browser workflow API key.

Path Parameters

projectId*string
Formatuuid
environmentId*string
Formatuuid
workflowId*string
Formatuuid

Header Parameters

Idempotency-Key?string

Optional. Generate a unique value before a write and retain it for an exact-body retry; replay is free and a different body returns 409 IDEMPOTENCY_CONFLICT.

Length8 <= length <= 200

Request Body

application/json
  1. body
workflow_version_id*string
Formatuuid
variables?
Default{}
priority?integer
Range0 <= value <= 9
Default0
ttl_ms?integer
Range30000 <= value <= 900000
Default300000

Response Body

One-time credential-free WebSocket endpoint, one-time credential, run ID and expiry. Error body uses the documented PublicError DTO.

application/json
  1. response
session_id*string
Formatuuid
run_id*string
Formatuuid
status*string
expires_at*string
Formatdate-time
websocket_url*string

Credential-free WebSocket endpoint. Never append credentials to this URL.

Match^wss?://
Formaturi
websocket_token*string

One-time WebSocket credential. Browser clients send it as the second Sec-WebSocket-Protocol value with runharvester-cdp-v1; non-browser clients send Authorization: Bearer. Never put it in the URL.

Match^[A-Za-z0-9_-]+$
Length16 <= length <= 512
curl -X POST 'https://api.runharvester.com/api/v1/browser/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/cdp-sessions' \  -H 'Content-Type: application/json' \  -d '{  "workflow_version_id": "60bab57e-9f59-448d-bef4-a6fd602db8a4"}' \  --header "X-API-Key: ${RUNHARVESTER_BROWSER_API_KEY:?Set your Browser Workflow API key}" \  --header "Idempotency-Key: ${RUNHARVESTER_IDEMPOTENCY_KEY:?Set a unique key for this submission; reuse it for retries}"
{  "session_id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",  "run_id": "7a20bd58-ed33-4a5b-b63f-b52bb1a62248",  "status": "running",  "expires_at": "2099-01-01T00:00:00.000Z",  "websocket_url": "wss://api.runharvester.com/api/v1/browser/cdp/sessions/9a20bd58-ed33-4a5b-b63f-b52bb1a62248/connect",  "websocket_token": "<one-time-token>"}