blob: 546bbfd32be06a29706b17e10601a5b8804ef370 [file] [log] [blame]
{
"domain": "Network",
"description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.",
"debuggableTypes": ["page", "service-worker", "web-page"],
"targetTypes": ["page", "service-worker"],
"types": [
{
"id": "LoaderId",
"type": "string",
"description": "Unique loader identifier."
},
{
"id": "FrameId",
"type": "string",
"description": "Unique frame identifier."
},
{
"id": "RequestId",
"type": "string",
"description": "Unique request identifier."
},
{
"id": "Timestamp",
"type": "number",
"description": "Elapsed seconds since frontend connected."
},
{
"id": "Walltime",
"type": "number",
"description": "Number of seconds since epoch."
},
{
"id": "Headers",
"type": "object",
"description": "Request / response headers as keys / values of JSON object."
},
{
"id": "ResourceTiming",
"type": "object",
"description": "Timing information for the request.",
"properties": [
{ "name": "startTime", "$ref": "Timestamp", "description": "Request is initiated" },
{ "name": "redirectStart", "$ref": "Timestamp", "description": "Started redirect resolution." },
{ "name": "redirectEnd", "$ref": "Timestamp", "description": "Finished redirect resolution." },
{ "name": "fetchStart", "$ref": "Timestamp", "description": "Resource fetching started." },
{ "name": "domainLookupStart", "type": "number", "description": "Started DNS address resolve in milliseconds relative to fetchStart." },
{ "name": "domainLookupEnd", "type": "number", "description": "Finished DNS address resolve in milliseconds relative to fetchStart." },
{ "name": "connectStart", "type": "number", "description": "Started connecting to the remote host in milliseconds relative to fetchStart." },
{ "name": "connectEnd", "type": "number", "description": "Connected to the remote host in milliseconds relative to fetchStart." },
{ "name": "secureConnectionStart", "type": "number", "description": "Started SSL handshake in milliseconds relative to fetchStart." },
{ "name": "requestStart", "type": "number", "description": "Started sending request in milliseconds relative to fetchStart." },
{ "name": "responseStart", "type": "number", "description": "Started receiving response headers in milliseconds relative to fetchStart." },
{ "name": "responseEnd", "type": "number", "description": "Finished receiving response headers in milliseconds relative to fetchStart." }
]
},
{
"id": "Request",
"type": "object",
"description": "HTTP request data.",
"properties": [
{ "name": "url", "type": "string", "description": "Request URL." },
{ "name": "method", "type": "string", "description": "HTTP request method." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP request headers." },
{ "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }
]
},
{
"id": "Response",
"type": "object",
"description": "HTTP response data.",
"properties": [
{ "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
{ "name": "status", "type": "integer", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
{ "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
{ "name": "source", "type": "string", "enum": ["unknown", "network", "memory-cache", "disk-cache", "service-worker", "inspector-override"], "description": "Specifies where the response came from." },
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
{ "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." },
{ "name": "security", "$ref": "Security.Security", "optional": true, "description": "The security information for the given request." }
]
},
{
"id": "Metrics",
"type": "object",
"description": "Network load metrics.",
"properties": [
{ "name": "protocol", "type": "string", "optional": true, "description": "Network protocol. ALPN Protocol ID Identification Sequence, as per RFC 7301 (for example, http/2, http/1.1, spdy/3.1)" },
{ "name": "priority", "type": "string", "enum": ["low", "medium", "high"], "optional": true, "description": "Network priority." },
{ "name": "connectionIdentifier", "type": "string", "optional": true, "description": "Connection identifier." },
{ "name": "remoteAddress", "type": "string", "optional": true, "description": "Remote IP address." },
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
{ "name": "requestHeaderBytesSent", "type": "number", "optional": true, "description": "Total HTTP request header bytes sent over the network." },
{ "name": "requestBodyBytesSent", "type": "number", "optional": true, "description": "Total HTTP request body bytes sent over the network." },
{ "name": "responseHeaderBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response header bytes received over the network." },
{ "name": "responseBodyBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response body bytes received over the network." },
{ "name": "responseBodyDecodedSize", "type": "number", "optional": true, "description": "Total decoded response body size in bytes." },
{ "name": "securityConnection", "$ref": "Security.Connection", "optional": true, "description": "Connection information for the completed request." }
]
},
{
"id": "WebSocketRequest",
"type": "object",
"description": "WebSocket request data.",
"properties": [
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
"id": "WebSocketResponse",
"type": "object",
"description": "WebSocket response data.",
"properties": [
{ "name": "status", "type": "integer", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
"id": "WebSocketFrame",
"type": "object",
"description": "WebSocket frame data.",
"properties": [
{ "name": "opcode", "type": "number", "description": "WebSocket frame opcode." },
{ "name": "mask", "type": "boolean", "description": "WebSocket frame mask." },
{ "name": "payloadData", "type": "string", "description": "WebSocket frame payload data." },
{ "name": "payloadLength", "type": "number", "description": "WebSocket frame payload length in bytes." }
]
},
{
"id": "CachedResource",
"type": "object",
"description": "Information about the cached resource.",
"properties": [
{ "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." },
{ "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
{ "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." },
{ "name": "bodySize", "type": "number", "description": "Cached response body size." },
{ "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." }
]
},
{
"id": "Initiator",
"type": "object",
"description": "Information about the request initiator.",
"properties": [
{ "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." },
{ "name": "stackTrace", "type": "array", "items": { "$ref": "Console.CallFrame" }, "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." },
{ "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." },
{ "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." },
{ "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "Set if the load was triggered by a DOM node, in addition to the other initiator information." }
]
},
{
"id": "NetworkStage",
"type": "string",
"description": "Different stages of a network request.",
"enum": ["response"]
}
],
"commands": [
{
"name": "enable",
"description": "Enables network tracking, network events will now be delivered to the client."
},
{
"name": "disable",
"description": "Disables network tracking, prevents network events from being sent to the client."
},
{
"name": "setExtraHTTPHeaders",
"description": "Specifies whether to always send extra HTTP headers with the requests from this page.",
"parameters": [
{ "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." }
]
},
{
"name": "getResponseBody",
"description": "Returns content served for the given request.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." }
],
"returns": [
{ "name": "body", "type": "string", "description": "Response body." },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." }
]
},
{
"name": "setResourceCachingDisabled",
"description": "Toggles whether the resource cache may be used when loading resources in the inspected page. If <code>true</code>, the resource cache will not be used when loading resources.",
"parameters": [
{ "name": "disabled", "type": "boolean", "description": "Whether to prevent usage of the resource cache." }
]
},
{
"name": "loadResource",
"description": "Loads a resource in the context of a frame on the inspected page without cross origin checks.",
"async": true,
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Frame to load the resource from." },
{ "name": "url", "type": "string", "description": "URL of the resource to load." }
],
"returns": [
{ "name": "content", "type": "string", "description": "Resource content." },
{ "name": "mimeType", "type": "string", "description": "Resource mimeType." },
{ "name": "status", "type": "integer", "description": "HTTP response status code." }
]
},
{
"name": "getSerializedCertificate",
"description": "Fetches a serialized secure certificate for the given requestId to be displayed via InspectorFrontendHost.showCertificate.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId" }
],
"returns": [
{ "name": "serializedCertificate", "type": "string", "description": "Represents a base64 encoded WebCore::CertificateInfo object." }
]
},
{
"name": "resolveWebSocket",
"description": "Resolves JavaScript WebSocket object for given request id.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the WebSocket resource to resolve." },
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
],
"returns": [
{ "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." }
]
},
{
"name": "setInterceptionEnabled",
"description": "Enable interception of network requests.",
"parameters": [
{ "name": "enabled", "type": "boolean" }
]
},
{
"name": "addInterception",
"description": "Add an interception.",
"parameters": [
{ "name": "url", "type": "string" },
{ "name": "stage", "$ref": "NetworkStage", "optional": true, "description": "If not present this applies to all network stages." }
]
},
{
"name": "removeInterception",
"description": "Remove an interception.",
"parameters": [
{ "name": "url", "type": "string" },
{ "name": "stage", "$ref": "NetworkStage", "optional": true, "description": "If not present this applies to all network stages." }
]
},
{
"name": "interceptContinue",
"description": "Continue an interception with no modifications.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network request or response to continue." }
]
},
{
"name": "interceptWithResponse",
"description": "Provide response content for an intercepted response.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network response to modify." },
{ "name": "content", "type": "string" },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." },
{ "name": "mimeType", "type": "string", "optional": true, "description": "MIME Type for the data." },
{ "name": "status", "type": "integer", "optional": true, "description": "HTTP response status code. Pass through original values if unmodified." },
{ "name": "statusText", "type": "string", "optional": true, "description": "HTTP response status text. Pass through original values if unmodified." },
{ "name": "headers", "$ref": "Headers", "optional": true, "description": "HTTP response headers. Pass through original values if unmodified." }
]
}
],
"events": [
{
"name": "requestWillBeSent",
"description": "Fired when page is about to send HTTP request.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
{ "name": "request", "$ref": "Request", "description": "Request data." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "walltime", "$ref": "Walltime" },
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
{ "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." },
{ "name": "type", "$ref": "Page.ResourceType", "optional": true, "description": "Resource type." },
{ "name": "targetId", "type": "string", "optional": true, "description": "Identifier for the context of where the load originated. In general this is the target identifier. For Workers this will be the workerId." }
]
},
{
"name": "responseReceived",
"description": "Fired when HTTP response is available.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
{ "name": "response", "$ref": "Response", "description": "Response data." }
]
},
{
"name": "dataReceived",
"description": "Fired when data chunk was received over the network.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "dataLength", "type": "integer", "description": "Data chunk length." },
{ "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
]
},
{
"name": "loadingFinished",
"description": "Fired when HTTP request has finished loading.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." },
{ "name": "metrics", "$ref": "Metrics", "optional": true, "description": "Network metrics." }
]
},
{
"name": "loadingFailed",
"description": "Fired when HTTP request has failed to load.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "errorText", "type": "string", "description": "User friendly error message." },
{ "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }
]
},
{
"name": "requestServedFromMemoryCache",
"description": "Fired when HTTP request has been served from memory cache.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
{ "name": "resource", "$ref": "CachedResource", "description": "Cached resource data." }
]
},
{
"name": "responseIntercepted",
"description": "Fired when HTTP response has been intercepted. The frontend must response with <code>Network.interceptContinue</code> or <code>Network.interceptWithRespons</code>` to continue this response.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for this intercepted network. Corresponds with an earlier <code>Network.requestWillBeSent</code>." },
{ "name": "response", "$ref": "Response", "description": "Original response content that would proceed if this is continued." }
]
},
{
"name": "webSocketWillSendHandshakeRequest",
"description": "Fired when WebSocket is about to initiate handshake.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "walltime", "$ref": "Walltime" },
{ "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." }
]
},
{
"name": "webSocketHandshakeResponseReceived",
"description": "Fired when WebSocket handshake response becomes available.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." }
]
},
{
"name": "webSocketCreated",
"description": "Fired upon WebSocket creation.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "url", "type": "string", "description": "WebSocket request URL." }
]
},
{
"name": "webSocketClosed",
"description": "Fired when WebSocket is closed.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
]
},
{
"name": "webSocketFrameReceived",
"description": "Fired when WebSocket frame is received.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
]
},
{
"name": "webSocketFrameError",
"description": "Fired when WebSocket frame error occurs.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." }
]
},
{
"name": "webSocketFrameSent",
"description": "Fired when WebSocket frame is sent.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
]
}
]
}