Browser Session Capability
Browser Session Capability 方法列表与请求响应合同。
使用绑定解析得到的 baseUrl 和实例 Capability Bearer Token。方法 path 拼接在 baseUrl 后;不发送工作区选择 Header。普通 JSON 响应使用 CModel,必须检查 errorCode;事件流使用 SSE。
协议:HTTP。合同:2.2.1。
方法列表
| 方法 | 用途 | HTTP |
|---|---|---|
| getCatalog | 列出浏览器工具 | GET /browser-sessions/catalog |
| listBrowserProfiles | 列出浏览器配置 | GET /browser-profiles |
| createBrowserProfile | 创建浏览器配置 | POST /browser-profiles |
| setDefaultBrowserProfile | 设置默认配置 | POST /browser-profiles/{profile_id}/default |
| deleteBrowserProfile | 删除配置 | DELETE /browser-profiles/{profile_id} |
| getBrowserProfile | 读取配置 | GET /browser-profiles/{profile_id} |
| listSessions | 列出会话 | GET /browser-sessions |
| createSession | 创建会话 | POST /browser-sessions |
| getSession | 读取会话 | GET /browser-sessions/{session_id} |
| heartbeatSession | 续期会话 | POST /browser-sessions/{session_id}/heartbeat |
| listTabs | 列出标签页 | GET /browser-sessions/{session_id}/tabs |
| createTab | 创建标签页 | POST /browser-sessions/{session_id}/tabs |
| activateTab | 激活标签页 | POST /browser-sessions/{session_id}/tabs/activate |
| closeTab | 关闭标签页 | POST /browser-sessions/{session_id}/tabs/close |
| getCurrentUrl | 读取当前地址 | GET /browser-sessions/{session_id}/current-url |
| navigate | 打开网页 | POST /browser-sessions/{session_id}/navigate |
| screenshot | 截屏 | POST /browser-sessions/{session_id}/screenshot |
| getDom | 读取 DOM | POST /browser-sessions/{session_id}/dom |
| getText | 读取文字 | POST /browser-sessions/{session_id}/text |
| click | 点击元素 | POST /browser-sessions/{session_id}/click |
| typeText | 输入文字 | POST /browser-sessions/{session_id}/type |
| evaluate | 执行 JavaScript | POST /browser-sessions/{session_id}/evaluate |
| getRequestContext | 读取请求上下文 | POST /browser-sessions/{session_id}/request-context |
| closeSession | 关闭会话 | POST /browser-sessions/{session_id}/close |
| listNetworkRequests | 列出网络请求 | GET /browser-sessions/{session_id}/network/requests |
| getNetworkRequest | 读取网络请求 | GET /browser-sessions/{session_id}/network/requests/{request_id} |
| exportNetworkHar | 导出 HAR | GET /browser-sessions/{session_id}/network/har |
| updateNetworkCaptureMode | 设置网络捕获模式 | POST /browser-sessions/{session_id}/network/capture-mode |
| streamRuntimeBindingEvents | 订阅浏览器 Runtime Binding 事件 | GET /browser-sessions/{session_id}/runtime-bindings/{binding_name}/events |
getCatalog
列出浏览器工具
GET /browser-sessions/catalog
{
"operationId": "getCatalog",
"summary": "列出浏览器工具",
"description": "列出浏览器工具",
"parameters": [],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserSessionCatalogResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}listBrowserProfiles
列出浏览器配置
GET /browser-profiles
{
"operationId": "listBrowserProfiles",
"summary": "列出浏览器配置",
"description": "列出浏览器配置",
"parameters": [],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrowserProfileResponse"
}
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}createBrowserProfile
创建浏览器配置
POST /browser-profiles
{
"operationId": "createBrowserProfile",
"summary": "创建浏览器配置",
"description": "创建浏览器配置",
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserProfileResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBrowserProfileRequest"
}
}
}
}
}setDefaultBrowserProfile
设置默认配置
POST /browser-profiles/{profile_id}/default
{
"operationId": "setDefaultBrowserProfile",
"summary": "设置默认配置",
"description": "设置默认配置",
"parameters": [
{
"name": "profile_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserProfileResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}deleteBrowserProfile
删除配置
DELETE /browser-profiles/{profile_id}
{
"operationId": "deleteBrowserProfile",
"summary": "删除配置",
"description": "删除配置",
"parameters": [
{
"name": "profile_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"type": "boolean"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}getBrowserProfile
读取配置
GET /browser-profiles/{profile_id}
{
"operationId": "getBrowserProfile",
"summary": "读取配置",
"description": "读取配置",
"parameters": [
{
"name": "profile_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserProfileResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}listSessions
列出会话
GET /browser-sessions
{
"operationId": "listSessions",
"summary": "列出会话",
"description": "列出会话",
"parameters": [],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrowserSessionResponse"
}
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}createSession
创建会话
POST /browser-sessions
{
"operationId": "createSession",
"summary": "创建会话",
"description": "创建会话",
"parameters": [
{
"name": "Idempotency-Key",
"in": "header",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserSessionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBrowserSessionRequest"
}
}
}
}
}getSession
读取会话
GET /browser-sessions/{session_id}
{
"operationId": "getSession",
"summary": "读取会话",
"description": "读取会话",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserSessionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}heartbeatSession
续期会话
POST /browser-sessions/{session_id}/heartbeat
{
"operationId": "heartbeatSession",
"summary": "续期会话",
"description": "续期会话",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/SessionHeartbeatResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}listTabs
列出标签页
GET /browser-sessions/{session_id}/tabs
{
"operationId": "listTabs",
"summary": "列出标签页",
"description": "列出标签页",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserTabListResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}createTab
创建标签页
POST /browser-sessions/{session_id}/tabs
{
"operationId": "createTab",
"summary": "创建标签页",
"description": "创建标签页",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserTabInfo"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTabRequest"
}
}
}
}
}activateTab
激活标签页
POST /browser-sessions/{session_id}/tabs/activate
{
"operationId": "activateTab",
"summary": "激活标签页",
"description": "激活标签页",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserTabInfo"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TabActionRequest"
}
}
}
}
}closeTab
关闭标签页
POST /browser-sessions/{session_id}/tabs/close
{
"operationId": "closeTab",
"summary": "关闭标签页",
"description": "关闭标签页",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserTabInfo"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TabActionRequest"
}
}
}
}
}getCurrentUrl
读取当前地址
GET /browser-sessions/{session_id}/current-url
{
"operationId": "getCurrentUrl",
"summary": "读取当前地址",
"description": "读取当前地址",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/CurrentUrlResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}navigate
打开网页
POST /browser-sessions/{session_id}/navigate
{
"operationId": "navigate",
"summary": "打开网页",
"description": "打开网页",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/NavigateResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NavigateRequest"
}
}
}
}
}screenshot
截屏
POST /browser-sessions/{session_id}/screenshot
{
"operationId": "screenshot",
"summary": "截屏",
"description": "截屏",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/ScreenshotResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}getDom
读取 DOM
POST /browser-sessions/{session_id}/dom
{
"operationId": "getDom",
"summary": "读取 DOM",
"description": "读取 DOM",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/DomResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetDomRequest"
}
}
}
}
}getText
读取文字
POST /browser-sessions/{session_id}/text
{
"operationId": "getText",
"summary": "读取文字",
"description": "读取文字",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/TextResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetTextRequest"
}
}
}
}
}click
点击元素
POST /browser-sessions/{session_id}/click
{
"operationId": "click",
"summary": "点击元素",
"description": "点击元素",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/ActionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClickRequest"
}
}
}
}
}typeText
输入文字
POST /browser-sessions/{session_id}/type
{
"operationId": "typeText",
"summary": "输入文字",
"description": "输入文字",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/ActionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TypeRequest"
}
}
}
}
}evaluate
执行 JavaScript
POST /browser-sessions/{session_id}/evaluate
{
"operationId": "evaluate",
"summary": "执行 JavaScript",
"description": "执行 JavaScript",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/EvaluateResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluateRequest"
}
}
}
}
}getRequestContext
读取请求上下文
POST /browser-sessions/{session_id}/request-context
{
"operationId": "getRequestContext",
"summary": "读取请求上下文",
"description": "读取请求上下文",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserRequestContextResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BrowserRequestContextRequest"
}
}
}
}
}closeSession
关闭会话
POST /browser-sessions/{session_id}/close
{
"operationId": "closeSession",
"summary": "关闭会话",
"description": "关闭会话",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserSessionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}listNetworkRequests
列出网络请求
GET /browser-sessions/{session_id}/network/requests
{
"operationId": "listNetworkRequests",
"summary": "列出网络请求",
"description": "列出网络请求",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "resourceType",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"name": "resourceTypes",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"name": "method",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
}
},
{
"name": "mimeType",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"name": "urlContains",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"name": "onlyJson",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
{
"name": "excludeStatic",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
{
"name": "onlyWithResponseBody",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/NetworkRequestListResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}getNetworkRequest
读取网络请求
GET /browser-sessions/{session_id}/network/requests/{request_id}
{
"operationId": "getNetworkRequest",
"summary": "读取网络请求",
"description": "读取网络请求",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "request_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/NetworkRequestDetailResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}exportNetworkHar
导出 HAR
GET /browser-sessions/{session_id}/network/har
{
"operationId": "exportNetworkHar",
"summary": "导出 HAR",
"description": "导出 HAR",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/HarResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}updateNetworkCaptureMode
设置网络捕获模式
POST /browser-sessions/{session_id}/network/capture-mode
{
"operationId": "updateNetworkCaptureMode",
"summary": "设置网络捕获模式",
"description": "设置网络捕获模式",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功响应",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"const": "0"
},
"data": {
"$ref": "#/components/schemas/BrowserSessionResponse"
}
}
},
{
"type": "object",
"required": [
"contractVersion",
"errorCode",
"data"
],
"properties": {
"contractVersion": {
"type": "string"
},
"errorCode": {
"type": "string",
"not": {
"const": "0"
}
},
"data": {
"type": "object",
"description": "CModelFailureData,包含用户可读错误和 retryable;保留 requestId 用于排障。"
}
}
}
]
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateNetworkCaptureRequest"
}
}
}
}
}streamRuntimeBindingEvents
订阅浏览器 Runtime Binding 事件
GET /browser-sessions/{session_id}/runtime-bindings/{binding_name}/events
{
"operationId": "streamRuntimeBindingEvents",
"summary": "订阅浏览器 Runtime Binding 事件",
"description": "订阅浏览器 Runtime Binding 事件",
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "binding_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "SSE:binding-ready、binding-called、stream-error;每个 data 为事件 JSON。连接关闭不代表浏览器会话关闭。",
"content": {
"text/event-stream": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"capabilityToken": []
}
]
}Schema 定义
所有 $ref 引用均来自同一提供方合同的 components。
{
"securitySchemes": {
"capabilityToken": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"BrowserSessionCatalogResponse": {
"type": "object",
"properties": {
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrowserSessionCatalogItem"
}
}
},
"required": [
"tools"
]
},
"BrowserSessionCatalogItem": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"key",
"label",
"description"
]
},
"BrowserProfileResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"browserType": {
"type": "string"
},
"status": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"lastUsedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createTime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updateTime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"browserType",
"status",
"isDefault"
]
},
"CreateBrowserProfileRequest": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"setAsDefault": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": []
},
"BrowserSessionResponse": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
},
"profileId": {
"type": "string"
},
"status": {
"$ref": "#/components/schemas/BrowserSessionStatus"
},
"deploymentId": {
"type": "string"
},
"deploymentStatus": {
"type": "string"
},
"containerId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"viewerUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rawVncUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cdpUrl": {
"type": "string"
},
"hostId": {
"type": "string"
},
"containerName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"profilePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"persistProfile": {
"type": "boolean"
},
"networkCaptureMode": {
"$ref": "#/components/schemas/NetworkCaptureMode"
},
"createdAt": {
"type": "string"
},
"lastActivityAt": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/BrowserSessionMetadata"
},
"error": {
"anyOf": [
{
"$ref": "#/components/schemas/BrowserSessionStartupError"
},
{
"type": "null"
}
]
}
},
"required": [
"sessionId",
"profileId",
"status",
"deploymentId",
"deploymentStatus",
"cdpUrl",
"hostId",
"persistProfile",
"networkCaptureMode",
"createdAt",
"lastActivityAt",
"expiresAt",
"updatedAt",
"metadata"
]
},
"BrowserSessionStatus": {
"oneOf": [
{
"const": "starting"
},
{
"const": "live"
},
{
"const": "failed"
},
{
"const": "closed"
}
]
},
"NetworkCaptureMode": {
"oneOf": [
{
"const": "off"
},
{
"const": "metadata"
},
{
"const": "full"
}
]
},
"BrowserSessionMetadata": {
"type": "object",
"properties": {
"customerId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"instanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"activeTargetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"anyOf": [
{
"$ref": "#/components/schemas/BrowserSessionMode"
},
{
"type": "null"
}
]
}
},
"required": []
},
"BrowserSessionMode": {
"oneOf": [
{
"const": "visible"
},
{
"const": "headless"
}
]
},
"BrowserSessionStartupError": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
}
},
"required": [
"code",
"message",
"retryable"
]
},
"CreateBrowserSessionRequest": {
"type": "object",
"properties": {
"profileId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"captureMode": {
"anyOf": [
{
"$ref": "#/components/schemas/NetworkCaptureMode"
},
{
"type": "null"
}
]
},
"mode": {
"anyOf": [
{
"$ref": "#/components/schemas/BrowserSessionMode"
},
{
"type": "null"
}
]
}
},
"required": []
},
"SessionHeartbeatResponse": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
},
"lastActivityAt": {
"type": "string"
},
"expiresAt": {
"type": "string"
}
},
"required": [
"sessionId",
"lastActivityAt",
"expiresAt"
]
},
"BrowserTabListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrowserTabInfo"
}
}
},
"required": [
"items"
]
},
"BrowserTabInfo": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"url",
"type",
"active"
]
},
"CreateTabRequest": {
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"activate": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": []
},
"TabActionRequest": {
"type": "object",
"properties": {
"targetId": {
"type": "string"
}
},
"required": [
"targetId"
]
},
"CurrentUrlResponse": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
},
"NavigateRequest": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"targetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"url"
]
},
"NavigateResponse": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
},
"ScreenshotResponse": {
"type": "object",
"properties": {
"data": {
"type": "string"
}
},
"required": [
"data"
]
},
"GetDomRequest": {
"type": "object",
"properties": {
"selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": []
},
"DomResponse": {
"type": "object",
"properties": {
"selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"mode",
"value"
]
},
"GetTextRequest": {
"type": "object",
"properties": {
"selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": []
},
"TextResponse": {
"type": "object",
"properties": {
"selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"value": {
"type": "string"
}
},
"required": [
"value"
]
},
"ClickRequest": {
"type": "object",
"properties": {
"selector": {
"type": "string"
}
},
"required": [
"selector"
]
},
"ActionResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
]
},
"TypeRequest": {
"type": "object",
"properties": {
"selector": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"selector",
"text"
]
},
"EvaluateRequest": {
"type": "object",
"properties": {
"script": {
"type": "string"
}
},
"required": [
"script"
]
},
"EvaluateResponse": {
"anyOf": [
{
"type": "object",
"properties": {
"value": {}
},
"required": [
"value"
]
},
{}
]
},
"BrowserRequestContextRequest": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"urls"
]
},
"BrowserRequestContextResponse": {
"type": "object",
"properties": {
"cookieHeader": {
"type": "string"
},
"cookieNames": {
"type": "array",
"items": {
"type": "string"
}
},
"userAgent": {
"type": "string"
}
},
"required": [
"cookieHeader",
"cookieNames",
"userAgent"
]
},
"NetworkRequestListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CapturedNetworkRequestSummary"
}
}
},
"required": [
"items"
]
},
"CapturedNetworkRequestSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"cdpRequestId": {
"type": "string"
},
"targetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"resourceType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"method": {
"type": "string"
},
"url": {
"type": "string"
},
"responseStatus": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"mimeType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"encodedDataLength": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"hasRequestCookies": {
"type": "boolean"
},
"hasRequestBody": {
"type": "boolean"
},
"hasResponseBody": {
"type": "boolean"
},
"responseBodyBase64Encoded": {
"type": "boolean"
},
"startedAt": {
"type": "string"
},
"finishedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"cdpRequestId",
"method",
"url",
"hasRequestCookies",
"hasRequestBody",
"hasResponseBody",
"responseBodyBase64Encoded",
"startedAt"
]
},
"NetworkRequestListQuery": {
"type": "object",
"properties": {
"resourceType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"resourceTypes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"mimeType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"urlContains": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"onlyJson": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"excludeStatic": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"onlyWithResponseBody": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"limit": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"required": []
},
"NetworkRequestDetailResponse": {
"type": "object",
"properties": {
"item": {
"$ref": "#/components/schemas/CapturedNetworkRequest"
}
},
"required": [
"item"
]
},
"CapturedNetworkRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"cdpRequestId": {
"type": "string"
},
"targetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"resourceType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"method": {
"type": "string"
},
"url": {
"type": "string"
},
"mimeType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"requestHeaders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HeaderPair"
}
},
"requestCookies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CapturedNetworkCookie"
}
},
"requestBody": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"responseStatus": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"responseHeaders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HeaderPair"
}
},
"responseBody": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"responseBodyBase64Encoded": {
"type": "boolean"
},
"encodedDataLength": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"startedAt": {
"type": "string"
},
"finishedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"cdpRequestId",
"method",
"url",
"requestHeaders",
"requestCookies",
"responseHeaders",
"responseBodyBase64Encoded",
"startedAt"
]
},
"HeaderPair": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"CapturedNetworkCookie": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"httpOnly": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"secure": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"sameSite": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"value"
]
},
"HarResponse": {
"type": "object",
"properties": {
"log": {
"$ref": "#/components/schemas/HarLog"
}
},
"required": [
"log"
]
},
"HarLog": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"creator": {
"$ref": "#/components/schemas/HarCreator"
},
"browser": {
"anyOf": [
{
"$ref": "#/components/schemas/HarCreator"
},
{
"type": "null"
}
]
},
"pages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarPage"
}
},
"entries": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarEntry"
}
}
},
"required": [
"version",
"creator",
"pages",
"entries"
]
},
"HarCreator": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
]
},
"HarPage": {
"type": "object",
"properties": {
"startedDateTime": {
"type": "string"
},
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"pageTimings": {
"$ref": "#/components/schemas/HarPageTimings"
}
},
"required": [
"startedDateTime",
"id",
"title",
"pageTimings"
]
},
"HarPageTimings": {
"type": "object",
"properties": {
"onContentLoad": {
"type": "integer"
},
"onLoad": {
"type": "integer"
}
},
"required": [
"onContentLoad",
"onLoad"
]
},
"HarEntry": {
"type": "object",
"properties": {
"pageref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startedDateTime": {
"type": "string"
},
"time": {
"type": "number"
},
"request": {
"$ref": "#/components/schemas/HarRequest"
},
"response": {
"$ref": "#/components/schemas/HarResponseData"
},
"cache": {},
"timings": {
"$ref": "#/components/schemas/HarTimings"
},
"serverIpAddress": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"connection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"startedDateTime",
"time",
"request",
"response",
"cache",
"timings"
]
},
"HarRequest": {
"type": "object",
"properties": {
"method": {
"type": "string"
},
"url": {
"type": "string"
},
"httpVersion": {
"type": "string"
},
"cookies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarCookie"
}
},
"headers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarHeader"
}
},
"queryString": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarQueryParam"
}
},
"postData": {
"anyOf": [
{
"$ref": "#/components/schemas/HarPostData"
},
{
"type": "null"
}
]
},
"headersSize": {
"type": "integer"
},
"bodySize": {
"type": "integer"
}
},
"required": [
"method",
"url",
"httpVersion",
"cookies",
"headers",
"queryString",
"headersSize",
"bodySize"
]
},
"HarCookie": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"HarHeader": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"HarQueryParam": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"HarPostData": {
"type": "object",
"properties": {
"mimeType": {
"type": "string"
},
"text": {
"type": "string"
},
"params": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarQueryParam"
}
}
},
"required": [
"mimeType",
"text",
"params"
]
},
"HarResponseData": {
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"statusText": {
"type": "string"
},
"httpVersion": {
"type": "string"
},
"cookies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarCookie"
}
},
"headers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HarHeader"
}
},
"content": {
"$ref": "#/components/schemas/HarContent"
},
"redirectUrl": {
"type": "string"
},
"headersSize": {
"type": "integer"
},
"bodySize": {
"type": "integer"
}
},
"required": [
"status",
"statusText",
"httpVersion",
"cookies",
"headers",
"content",
"redirectUrl",
"headersSize",
"bodySize"
]
},
"HarContent": {
"type": "object",
"properties": {
"size": {
"type": "integer"
},
"mimeType": {
"type": "string"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"size",
"mimeType"
]
},
"HarTimings": {
"type": "object",
"properties": {
"blocked": {
"type": "number"
},
"dns": {
"type": "number"
},
"connect": {
"type": "number"
},
"send": {
"type": "number"
},
"wait": {
"type": "number"
},
"receive": {
"type": "number"
},
"ssl": {
"type": "number"
}
},
"required": [
"blocked",
"dns",
"connect",
"send",
"wait",
"receive",
"ssl"
]
},
"UpdateNetworkCaptureRequest": {
"type": "object",
"properties": {
"captureMode": {
"$ref": "#/components/schemas/NetworkCaptureMode"
}
},
"required": [
"captureMode"
]
}
}
}