Overview
Magic Transit provides network-level DDoS protection and traffic acceleration for your entire network. Use the Magic Transit API to manage routes, tunnels, sites, and network monitoring.Initialize the client
Resources
The Magic Transit API provides the following sub-resources:Routes
Manage Magic static routes for traffic routing.Create a route
Creates a new Magic static route.Account identifier
The next hop IP address for this route
IP prefix in CIDR notation
Route priority (lower values have higher priority)
Update a route
Update a specific Magic static route.List routes
List all Magic static routes.Delete a route
Disable and remove a specific Magic static route.GRE tunnels
Manage Generic Routing Encapsulation (GRE) tunnels for Magic Transit.create()- Create a new GRE tunnelupdate()- Update an existing GRE tunnellist()- List all GRE tunnelsdelete()- Delete a GRE tunnelget()- Get details of a specific GRE tunnelbulkUpdate()- Update multiple GRE tunnels at once
IPsec tunnels
Manage IPsec tunnels for Magic Transit.create()- Create a new IPsec tunnelupdate()- Update an existing IPsec tunnellist()- List all IPsec tunnelsdelete()- Delete an IPsec tunnelget()- Get details of a specific IPsec tunnelpskGenerate()- Generate a pre-shared key for IPsec tunnel
Sites
Manage Magic Transit sites with LAN/WAN configuration.create()- Create a new siteupdate()- Update an existing sitelist()- List all sitesdelete()- Delete a siteget()- Get details of a specific site
Connectors
Manage Magic Connector instances for site connectivity.PCAPs
Capture and analyze network packet data.create()- Start a new packet capturelist()- List all packet capturesget()- Get details of a specific capturestop()- Stop an ongoing packet capture
CF Interconnects
Manage Cloudflare Interconnects for Magic Transit.Apps
Manage Magic Transit application configurations.Types
HealthCheck
Configuration for tunnel health checks.Determines whether to run health checks for a tunnel
How frequently the health check runs (default: ‘mid’)
The type of health check to run (default: ‘reply’)
The destination address for request-type health checks