Skip to content
Start here

Get session details.

client.browserRendering.devtools.session.get(stringsessionID, SessionGetParams { account_id } params, RequestOptionsoptions?): SessionGetResponse { sessionId, closeReason, closeReasonText, 8 more } | null
GET/accounts/{account_id}/browser-rendering/devtools/session/{session_id}

Get details for a specific browser session.

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
sessionID: string

Session ID.

formatuuid
params: SessionGetParams { account_id }
account_id: string

Account ID.

ReturnsExpand Collapse
SessionGetResponse { sessionId, closeReason, closeReasonText, 8 more }
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.

Get session details.

import Cloudflare from 'cloudflare';

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

const session = await client.browserRendering.devtools.session.get(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  { account_id: 'account_id' },
);

console.log(session.sessionId);
{
  "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"
}