Cloudflare Port
This is the reference integration for Harbor `http_api` Action Model authoring for Cloudflare.
Cloudflare Port
Purpose
This is the reference integration for Harbor http_api Action Model authoring for Cloudflare.
Use it when:
- building Cloudflare actions in Harbor
- extending the Dock / Hub Cloudflare entry
- teaching Codex or OpenClaw how to map a zone-scoped infrastructure API into Harbor Ports and Harbor Actions
Harbor Port worksheet
Product
- Product: Cloudflare API
- Publisher slug:
cloudflare - Publisher name:
Cloudflare - Category:
Infrastructure - Tags:
cloudflare,dns,infrastructure,domains,edge
Safe Harbor Port metadata
- Kind:
http_api - Label:
Cloudflare API - Description:
Cloudflare API connection managed locally through Harbor. - Base URL:
https://api.cloudflare.com/client/v4/ - Auth mode:
header_token - Auth header name:
Authorization - Auth token prefix:
Bearer
Hidden local config
authToken
Harbor stores the token locally only. Dock / Hub manifests must never contain it.
Integration scope
This Cloudflare integration is now a full zone-scoped control-plane pass rather than a starter set.
Covered families:
- zones and activation checks
- zone settings, holds, subscriptions, available plans, and rate plans
- DNS records, DNSSEC, DNS scans, DNS settings, and DNS analytics
- secondary DNS incoming and outgoing configuration
- cache purge, Cache Reserve, Smart Tiered Cache, cache variants, and Regional Tiered Cache
- zone tags and security.txt
Deferred families:
- account-scoped DNS admin surfaces such as ACLs, TSIGs, views, peers, and account DNS settings
- Workers, Pages, R2, Stream, Images, Zero Trust, Access, Magic, billing, and org-wide administration
Platform-limited families:
- DNS export because Cloudflare returns raw text rather than JSON
- DNS import because Cloudflare expects multipart upload
See apps/hub/catalog/integrations/cloudflare/ActionMap.md for the action inventory and apps/hub/catalog/integrations/cloudflare/TechnicalLimitations.md for exact Harbor platform gaps.
Harbor action design notes
Cloudflare is a good Harbor fit when we stay on explicit zone-scoped routes with bounded path parameters, typed query filters, and JSON request bodies for writes.
Good Harbor Cloudflare actions:
- fixed
GETlist/read routes like/zones - bounded path templates like
/zones/{zone_id}/dns_records/{dns_record_id} requestBodyMode: "none"for reads and delete-style actionsrequestBodyMode: "json"for reviewed write actionsresultMode: "json_summary"for the supported zone-scoped surface
Guardrails that remain important:
- keep all mutating actions on
require_approvalby default - do not widen this manifest into a generic Cloudflare proxy
- do not mix account-scoped administration into the zone-scoped control plane without a separate completeness pass
Current Cloudflare actions
Automatic read actions
list-zonesget-zonelist-zone-settingsget-zone-settingget-zone-holdget-zone-subscriptionlist-available-plansget-available-planlist-available-rate-plansget-dnsseclist-dns-recordsget-dns-recordlist-scanned-dns-recordsget-zone-dns-settingsget-dns-analytics-reportget-dns-analytics-report-bytimeget-secondary-dns-incomingget-secondary-dns-outgoingget-secondary-dns-outgoing-statusget-cache-reserveget-cache-reserve-clear-statusget-smart-tiered-cacheget-cache-variantsget-regional-tiered-cacheget-zone-tagsget-security-txt
Approval-friendly write actions
create-zoneupdate-zonedelete-zonetrigger-zone-activation-checkupdate-zone-settingbulk-update-zone-settingscreate-zone-holdupdate-zone-holddelete-zone-holdcreate-zone-subscriptionupdate-zone-subscriptionupdate-dnssecdelete-dnsseccreate-dns-recordoverwrite-dns-recordupdate-dns-recorddelete-dns-recordtrigger-dns-record-scanreview-scanned-dns-recordsbatch-dns-recordsupdate-zone-dns-settingsforce-axfrcreate-secondary-dns-incomingupdate-secondary-dns-incomingdelete-secondary-dns-incomingcreate-secondary-dns-outgoingupdate-secondary-dns-outgoingdelete-secondary-dns-outgoingdisable-secondary-dns-outgoingenable-secondary-dns-outgoingforce-secondary-dns-notifypurge-cacheupdate-cache-reservestart-cache-reserve-clearupdate-smart-tiered-cachedelete-smart-tiered-cacheupdate-cache-variantsdelete-cache-variantsupdate-regional-tiered-cacheupdate-zone-tagsdelete-zone-tagsupdate-security-txtdelete-security-txt
Suggested operator workflow
- Import the Cloudflare Dock entry from Dock / Hub.
- Configure the local Cloudflare API token in Harbor Node.
- Validate
list-zonesandget-zonefirst to confirm local auth and scope coverage. - Use
list-dns-records,get-zone-dns-settings, andget-dnssecto inspect current state. - Keep zone, DNS, secondary DNS, cache, and tagging writes on
require_approvalunless your Harbor Guard policy deliberately allows an exact subset.
Suggested agent workflow
- Inspect the existing Cloudflare Harbor Port.
- Inspect live actions and drafts.
- Stay inside this manifest's zone-scoped control plane unless the task explicitly starts a new Cloudflare surface.
- Validate and test drafts.
- Request publish instead of self-publishing unless Harbor explicitly allows it.
Agents should never:
- ask Harbor for the stored API token
- widen Cloudflare into a generic arbitrary HTTP proxy
- bypass review for DNS, cache, or zone writes
Current update strategy
For now, Cloudflare updates are manual:
- update the Dock / Hub integration document in
apps/hub/catalog/integrations/cloudflare/cloudflare-api.json - update
apps/hub/catalog/integrations/cloudflare/ActionMap.mdwhen the action set changes materially - update
apps/hub/catalog/integrations/cloudflare/TechnicalLimitations.mdwhen a Harbor platform limit blocks a Cloudflare route - re-import into Harbor or create new drafts from the updated Dock entry
Official reference starting points
- Cloudflare API overview:
https://developers.cloudflare.com/api/overview/ - Cloudflare zones API:
https://developers.cloudflare.com/api/resources/zones/ - Cloudflare DNS records API:
https://developers.cloudflare.com/api/resources/dns/subresources/records/ - Cloudflare cache API:
https://developers.cloudflare.com/api/resources/cache/ - Cloudflare resource tags API:
https://developers.cloudflare.com/api/resources/zones/subresources/tags/