Skip to content
Start here

List sessions.

client.browserRendering.devtools.session.list(SessionListParams { account_id, limit, offset } params, RequestOptionsoptions?): SessionListResponse { sessionId, closeReason, closeReasonText, 8 more }
GET/accounts/{account_id}/browser-rendering/devtools/session

List active browser sessions.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Browser Rendering WriteBrowser Rendering Read
ParametersExpand Collapse
params: SessionListParams { account_id, limit, offset }
account_id: string

Path param: Account ID.

limit?: number

Query param

maximum200
minimum1
offset?: number

Query param

minimum0
ReturnsExpand Collapse
SessionListResponse = Array<SessionListResponseItem>
sessionId: string

Session ID.

formatuuid
closeReason?: string

Reason for session closure.

closeReasonText?: string

Human-readable close reason.

connectionEndTime?: number

Connection end time.

connectionId?: string

Connection ID.

connectionStartTime?: number

Connection start time.

devtoolsFrontendUrl?: string

DevTools frontend URL.

endTime?: number

Session end time.

lastUpdated?: number

Last updated timestamp.

startTime?: number

Session start time.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

List sessions.

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const sessions = await client.browserRendering.devtools.session.list({ account_id: 'account_id' });

console.log(sessions);
[
  {
    "sessionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "closeReason": "closeReason",
    "closeReasonText": "closeReasonText",
    "connectionEndTime": 0,
    "connectionId": "connectionId",
    "connectionStartTime": 0,
    "devtoolsFrontendUrl": "devtoolsFrontendUrl",
    "endTime": 0,
    "lastUpdated": 0,
    "startTime": 0,
    "webSocketDebuggerUrl": "webSocketDebuggerUrl"
  }
]
Returns Examples
[
  {
    "sessionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "closeReason": "closeReason",
    "closeReasonText": "closeReasonText",
    "connectionEndTime": 0,
    "connectionId": "connectionId",
    "connectionStartTime": 0,
    "devtoolsFrontendUrl": "devtoolsFrontendUrl",
    "endTime": 0,
    "lastUpdated": 0,
    "startTime": 0,
    "webSocketDebuggerUrl": "webSocketDebuggerUrl"
  }
]