Of the 9 Network methods, browser sessions serve 7, phone sessions 0 and computer sessions 7. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.

Network.setRules

Browser: served Phone: not served Computer: served Replace the session’s whole rule list. Rules run in the browser, installed on every tab, frame and worker of the session, and the browser intercepts only what active rules need, only while a list is set; interception adds a little latency to matching requests. Some service-worker traffic and WebSocket frames are not seen (the WebSocket handshake is). Rules are matched separately at each stage: at the request stage only request-stage rules are considered, at the response stage only response-stage rules, each in list order, first match wins, so a rule never shadows one of the other stage. A record rule ends matching for its stage, so record and a modifying rule never both apply to one request. The call returns once the new list is live: requests already in flight finish under the old one. With version, the call fails with Conflict unless it matches the live list’s version. Over 200 rules or 1 MiB (inline bodies included), a rule that won’t compile, a field that doesn’t belong to its action type, or a header in x-dcp-network-forbidden-headers fails with InvalidArgs and leaves the old list in place. Every request a rule lets through, rewritten or not, still leaves through the session’s egress policy, so no rule can reach a destination policy refuses.
{"id": 1, "method": "Network.setRules", "params": {"rules": []}}
ParamTypeRequiredDescription
rulesNetworkRule[]Yes
versionintegerNoWhen set, the live list’s version must equal it, or Conflict.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result
FieldTypeDescription
versioninteger

Network.getRules

Browser: served Phone: not served Computer: served The live rule list and its version.
{"id": 1, "method": "Network.getRules", "params": {}}
No params. Result
FieldTypeDescription
rulesNetworkRule[]
versioninteger

Network.waitForRequest

Browser: served Phone: not served Computer: served The next request matching match that the browser made. With observation on (Network.setObservation) every request is recorded. With observation off, only requests an active rule intercepts are recorded, so a wait whose match no rule covers may time out; turn observation on for those. With observation off and no rules at all, the call fails with StrategyUnavailable at once. With afterSeq, only requests after it count (network records are kept 5000 entries or 2 minutes). Headers in x-dcp-redacted-headers read “[redacted]”.
{"id": 1, "method": "Network.waitForRequest", "params": {}}
ParamTypeRequiredDescription
matchNetworkMatchNoEvery field given must match. url is a glob as in Playwright (* within a path segment, ** across segments, ? one character, {a,b} either), urlRegex an RE2 expression; give at most one. Both match the full URL, query included, fragment excluded. A redirect is two requests: response rules see the 3xx (its status and Location), and the follow-up request is matched again at the request stage; both hops share one requestId in records.
afterSeqintegerNoOnly events after this event-log position count (a response’s seq). The log keeps each category for its own window (events: 1000 entries or 5 minutes; network records: 5000 entries or 2 minutes). One older than the window of the category the wait reads fails with EventsExpired; re-read state instead.
timeoutMsintegerNoBudget in milliseconds. 0 or omitted means 30000; at most 120000. Running out is ActionTimeout.
Result
FieldTypeDescription
requestIdstringOpaque; the same for every hop of one redirect chain.
methodstring
urlstring
resourceTypestringThe browser’s own resource type: a document in the main frame is document and in a child frame iframe; stylesheets are style; images image; fonts font; media and text tracks media; scripts script, or worker for a worker’s main script; XHR, fetch and event-source requests fetch; WebSocket handshakes websocket; manifests manifest; anything else (preflights, pings, prefetches, reports, signed exchanges) other. One of document, iframe, script, style, image, font, media, manifest, worker, fetch, websocket, other.
requestHeadersNameValue[]
statusinteger
responseHeadersNameValue[]
timestampMsintegerWhen the browser sent it, epoch-ms.
ruleIdstring
pauseSkippedbooleanA pause rule matched while 50 requests were already held.
requestBodyFileIdstring
responseBodyFileIdstring
requestBodyTruncatedboolean
responseBodyTruncatedboolean

Network.waitForResponse

Browser: served Phone: not served Computer: served The next response matching match, as Network.waitForRequest.
{"id": 1, "method": "Network.waitForResponse", "params": {}}
ParamTypeRequiredDescription
matchNetworkMatchNoEvery field given must match. url is a glob as in Playwright (* within a path segment, ** across segments, ? one character, {a,b} either), urlRegex an RE2 expression; give at most one. Both match the full URL, query included, fragment excluded. A redirect is two requests: response rules see the 3xx (its status and Location), and the follow-up request is matched again at the request stage; both hops share one requestId in records.
afterSeqintegerNoOnly events after this event-log position count (a response’s seq). The log keeps each category for its own window (events: 1000 entries or 5 minutes; network records: 5000 entries or 2 minutes). One older than the window of the category the wait reads fails with EventsExpired; re-read state instead.
timeoutMsintegerNoBudget in milliseconds. 0 or omitted means 30000; at most 120000. Running out is ActionTimeout.
Result
FieldTypeDescription
requestIdstringOpaque; the same for every hop of one redirect chain.
methodstring
urlstring
resourceTypestringThe browser’s own resource type: a document in the main frame is document and in a child frame iframe; stylesheets are style; images image; fonts font; media and text tracks media; scripts script, or worker for a worker’s main script; XHR, fetch and event-source requests fetch; WebSocket handshakes websocket; manifests manifest; anything else (preflights, pings, prefetches, reports, signed exchanges) other. One of document, iframe, script, style, image, font, media, manifest, worker, fetch, websocket, other.
requestHeadersNameValue[]
statusinteger
responseHeadersNameValue[]
timestampMsintegerWhen the browser sent it, epoch-ms.
ruleIdstring
pauseSkippedbooleanA pause rule matched while 50 requests were already held.
requestBodyFileIdstring
responseBodyFileIdstring
requestBodyTruncatedboolean
responseBodyTruncatedboolean

Network.setObservation

Browser: served Phone: not served Computer: served Turn passive traffic observation on or off for the session. While it is on, every request the browser makes is recorded for Network.waitForRequest, waitForResponse and the traffic record, cached responses included, and history is kept from that moment (network records: 5000 entries or 2 minutes). Observation is passive: it never holds, delays or changes a request; only rules do. It is off by default; turn it on before the action whose traffic a script waits for. Pages may notice that traffic is being observed, so leave it off when nothing needs it.
{"id": 1, "method": "Network.setObservation", "params": {"enabled": true}}
ParamTypeRequiredDescription
enabledbooleanYes
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Network.getRecords

Browser: not served Phone: not served Computer: not served The kept traffic record after afterSeq, oldest first: every request and response recorded since (observation on), or only those a rule intercepted (observation off), as Network.waitForRequest. kind keeps only requests or only responses; match filters as the waits’ does. limit defaults to 200, at most 1000; more says there are later records, so call again with afterSeq set to lastSeq. Records are kept 5000 entries or 2 minutes. To list what an action caused, pass the seq its reply carried. With observation off and no rules, fails with StrategyUnavailable.
{"id": 1, "method": "Network.getRecords", "params": {}}
ParamTypeRequiredDescription
afterSeqintegerNoOnly events after this event-log position count (a response’s seq). The log keeps each category for its own window (events: 1000 entries or 5 minutes; network records: 5000 entries or 2 minutes). One older than the window of the category the wait reads fails with EventsExpired; re-read state instead.
kindstringNoOne of request, response.
matchNetworkMatchNoEvery field given must match. url is a glob as in Playwright (* within a path segment, ** across segments, ? one character, {a,b} either), urlRegex an RE2 expression; give at most one. Both match the full URL, query included, fragment excluded. A redirect is two requests: response rules see the 3xx (its status and Location), and the follow-up request is matched again at the request stage; both hops share one requestId in records.
limitintegerNoFrom 1 to 1000. Default 200.
Result
FieldTypeDescription
recordsNetworkRecordEntry[]
lastSeqintegerThe next call’s afterSeq.
morebooleanThe limit cut the list short.

Network.getResponseBody

Browser: not served Phone: not served Computer: not served The body of one observed response, read from the browser when asked; atlas keeps no bodies. Needs observation on (Network.setObservation), else StrategyUnavailable. Only text bodies (JSON, text/, JavaScript, XML, form data) are returned: the first 1 MiB of a JSON body and the first 65536 bytes of other text, with truncated set past that; any other content type fails with InvalidArgs. With jsonPath (RFC 9535, e.g. $.data.items[].name), a JSON body is parsed whole (up to 16 MiB) and body is the JSON array of the matched values instead, with matches their count; an invalid query or a body that isn’t JSON fails with InvalidArgs. The browser keeps bodies only for a while and drops a page’s when it navigates away, so ask soon after the response; a requestId with no kept body (unknown, still loading, or dropped) fails with TargetNotFound.
{"id": 1, "method": "Network.getResponseBody", "params": {"requestId": "<requestId>"}}
ParamTypeRequiredDescription
requestIdstringYesAn observed response record’s requestId.
jsonPathstringNoAn RFC 9535 JSONPath query; body becomes the JSON array of what it matches.
Result
FieldTypeDescription
bodystring
contentTypestring
truncatedbooleanThe body (or, with jsonPath, the matches) passed the cap: 1 MiB for JSON, 65536 bytes for other text.
matchesintegerHow many values jsonPath matched.

Network.waitForPaused

Browser: served Phone: not served Computer: served The next request or response a pause rule holds. At most 50 are held at once; past that a pause rule’s defaultAction runs at once and the record says pauseSkipped.
{"id": 1, "method": "Network.waitForPaused", "params": {}}
ParamTypeRequiredDescription
afterSeqintegerNoOnly events after this event-log position count (a response’s seq). The log keeps each category for its own window (events: 1000 entries or 5 minutes; network records: 5000 entries or 2 minutes). One older than the window of the category the wait reads fails with EventsExpired; re-read state instead.
timeoutMsintegerNoBudget in milliseconds. 0 or omitted means 30000; at most 120000. Running out is ActionTimeout.
Result
FieldTypeDescription
pausedIdstring
stagestringOne of request, response. Default "request".
methodstring
urlstring
resourceTypestringThe browser’s own resource type: a document in the main frame is document and in a child frame iframe; stylesheets are style; images image; fonts font; media and text tracks media; scripts script, or worker for a worker’s main script; XHR, fetch and event-source requests fetch; WebSocket handshakes websocket; manifests manifest; anything else (preflights, pings, prefetches, reports, signed exchanges) other. One of document, iframe, script, style, image, font, media, manifest, worker, fetch, websocket, other.
headersNameValue[]Request headers at the request stage, response headers at the response stage.
statusinteger
bodyPreviewBase64stringThe body that has arrived so far, up to 64 KiB. A streaming body is not buffered past that.
bodyTruncatedboolean
ruleIdstring
expiresAtMsintegerWhen defaultAction runs if nobody answers.

Network.continuePaused

Browser: served Phone: not served Computer: served Answer a held request with any action but pause. An unknown or expired pausedId fails with InvalidArgs; an expired one already got its rule’s defaultAction.
{"id": 1, "method": "Network.continuePaused", "params": {"pausedId": "<pausedId>", "action": {}}}
ParamTypeRequiredDescription
pausedIdstringYes
actionNetworkActionYesWhat a rule does, tagged by type. Each type takes only its own fields; setRules refuses any other, so a rule never silently does something else. No action may set or remove host, any HTTP/2 pseudo-header (:path, :method, :scheme, :authority) or the hop-by-hop and framing headers (x-dcp-network-forbidden-headers), and header names must be HTTP tokens: the destination, path and method change only through url and method, and a rewritten url must be an absolute http or https URL. continue sends the request on, optionally with url and method changed (request stage only) and headers set or removed (request headers at the request stage, response headers at the response stage). A rewritten url is checked against egress policy again and matched against the request rules once more, never in a loop. fulfill answers without the origin (at the response stage it replaces the body): status, headers, and one of body, bodyBase64 and fileId. abort refuses: mode forbidden answers 403, reset resets the stream. pause holds the request, or the response before its body is forwarded, until Network.continuePaused or timeoutMs (10 s by default), then runs defaultAction. record is continue plus storing the request and response bodies in Files, up to 10 MiB each, counted against the organization’s Files quota; it is a request-stage action.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.