A Chrome DevTools extension that intercepts Cloudflare dashboard API requests and converts them into <APIRequest /> component snippets for use in Cloudflare developer documentation.
When you interact with the Cloudflare dashboard, the extension captures /api/v4/ network requests to accounts and zones and displays them in a dedicated DevTools panel. Each request card shows:
- The HTTP method and full URL
- The request payload (for POST, PUT, PATCH, DELETE)
- Copy buttons for the URL, payload, and a formatted
<APIRequest />component
The <APIRequest /> output replaces IDs in the path with named placeholders:
| URL path | Output |
|---|---|
/accounts/abc123.../ |
/accounts/{account_id}/ |
/zones/def456.../ |
/zones/{zone_id}/ |
/devices/policy/0c5c11f9-8f8d-... |
/devices/policy/{policy_id} |
/rulesets/abc.../rules/def... |
/rulesets/{ruleset_id}/rules/{rule_id} |
Query parameters and JSON payloads are included in the component output as params and json props.
Corporate-managed Chrome instances block custom extensions. To load this extension, use Chrome for Testing, a separate Chrome build that allows unpacked extensions.
- Go to the Chrome for Testing dashboard.
- Find the Stable channel row and copy the download URL for your OS.
- Paste the URL into a browser tab to start the download.
- Unzip the downloaded folder.
- Open
Google Chrome for Testing.appfrom the unzipped folder.
macOS flags downloaded apps as untrusted. To remove the quarantine flag:
- Open Terminal.
- Type the following command, but do not press Enter yet:
sudo xattr -cr
- Drag the
Google Chrome for Testing.appfrom Finder into the Terminal window (this fills in the file path). The full command should look like:sudo xattr -cr /path/to/chrome-mac-arm64/Google\ Chrome\ for\ Testing.app
- Press Enter and provide your password.
After that, open Google Chrome for Testing.app from the unzipped folder.
- Clone or download this repo.
- Open Chrome for Testing and type
chrome://extensions/in the address bar. - Turn on Developer mode (top right).
- Select Load unpacked and select this directory.
- Pull the latest changes from remote or make changes to the repo locally.
- Go to
chrome://extensions/in Chrome for Testing. - Select the reload icon on the Cloudflare API Filter card.
- If DevTools was already open, close the DevTools panel and reopen it to load the updated extension.
- Open Chrome for Testing.
- Open Chrome DevTools (F12 or Cmd+Opt+I).
- Select
>>to show all tabs, then select the Cloudflare API Filter tab. - Navigate to the Cloudflare dashboard. Requests appear in the panel as they happen.
- Select Copy as APIRequest to copy the formatted component to your clipboard.
