Skip to content
Start here

Export Resources

GET/accounts/{account_id}/magic/cloud/resources/export

Export resources in the Resource Catalog as a JSON file (Closed Beta).

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Magic WAN WriteMagic WAN Read
Path ParametersExpand Collapse
account_id: string
Query ParametersExpand Collapse
desc: optional boolean
order_by: optional string

One of [“id”, “resource_type”, “region”].

provider_id: optional string
region: optional string
resource_group: optional string
resource_id: optional array of string
resource_type: optional array of "aws_customer_gateway" or "aws_egress_only_internet_gateway" or "aws_internet_gateway" or 54 more
One of the following:
"aws_customer_gateway"
"aws_egress_only_internet_gateway"
"aws_internet_gateway"
"aws_instance"
"aws_network_interface"
"aws_route"
"aws_route_table"
"aws_route_table_association"
"aws_subnet"
"aws_vpc"
"aws_vpc_ipv4_cidr_block_association"
"aws_vpn_connection"
"aws_vpn_connection_route"
"aws_vpn_gateway"
"aws_security_group"
"aws_vpc_security_group_ingress_rule"
"aws_vpc_security_group_egress_rule"
"aws_ec2_managed_prefix_list"
"aws_ec2_transit_gateway"
"aws_ec2_transit_gateway_prefix_list_reference"
"aws_ec2_transit_gateway_vpc_attachment"
"azurerm_application_security_group"
"azurerm_lb"
"azurerm_lb_backend_address_pool"
"azurerm_lb_nat_pool"
"azurerm_lb_nat_rule"
"azurerm_lb_rule"
"azurerm_local_network_gateway"
"azurerm_network_interface"
"azurerm_network_interface_application_security_group_association"
"azurerm_network_interface_backend_address_pool_association"
"azurerm_network_interface_security_group_association"
"azurerm_network_security_group"
"azurerm_public_ip"
"azurerm_route"
"azurerm_route_table"
"azurerm_subnet"
"azurerm_subnet_route_table_association"
"azurerm_virtual_machine"
"azurerm_virtual_network_gateway_connection"
"azurerm_virtual_network"
"azurerm_virtual_network_gateway"
"google_compute_network"
"google_compute_subnetwork"
"google_compute_vpn_gateway"
"google_compute_vpn_tunnel"
"google_compute_route"
"google_compute_address"
"google_compute_global_address"
"google_compute_router"
"google_compute_interconnect_attachment"
"google_compute_ha_vpn_gateway"
"google_compute_forwarding_rule"
"google_compute_network_firewall_policy"
"google_compute_network_firewall_policy_rule"
"cloudflare_static_route"
"cloudflare_ipsec_tunnel"
v2: optional boolean

Export Resources

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/cloud/resources/export \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
Returns Examples