Magic Transit

MagicTransit

Domain types

HealthCheck{…}
HealthCheckRate = "low" | "mid" | "high"

How frequent the health check is run. The default value is mid.

HealthCheckType = "reply" | "request"

The type of healthcheck to run, reply or request. The default value is reply.

MagicTransit.Apps

Methods

list(, ): <>
get/accounts/{account_id}/magic/apps

Lists Apps associated with an account.

create(, ): | null
post/accounts/{account_id}/magic/apps

Creates a new App for an account

update(, , ): | null
put/accounts/{account_id}/magic/apps/{account_app_id}

Updates an Account App

edit(, , ): | null
patch/accounts/{account_id}/magic/apps/{account_app_id}

Updates an Account App

delete(, , ): | null
delete/accounts/{account_id}/magic/apps/{account_app_id}

Deletes specific Account App.

Magic Transit

Cf Interconnects

MagicTransit.CfInterconnects

Methods

list(, ):
get/accounts/{account_id}/magic/cf_interconnects

Lists interconnects associated with an account.

get(, , ):
get/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}

Lists details for a specific interconnect.

update(, , ):
put/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}

Updates a specific interconnect associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

bulkUpdate(, ):
put/accounts/{account_id}/magic/cf_interconnects

Updates multiple interconnects associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

Magic Transit

Connectors

MagicTransit.Connectors

Methods

list(, ): <>
get/accounts/{account_id}/magic/connectors

List Connectors

get(, , ):
get/accounts/{account_id}/magic/connectors/{connector_id}

Fetch Connector

create(, ):
post/accounts/{account_id}/magic/connectors

Add a connector to your account

update(, , ):
put/accounts/{account_id}/magic/connectors/{connector_id}

Replace Connector or Re-provision License Key

edit(, , ):
patch/accounts/{account_id}/magic/connectors/{connector_id}

Edit Connector to update specific properties or Re-provision License Key

delete(, , ):
delete/accounts/{account_id}/magic/connectors/{connector_id}

Remove a connector from your account

MagicTransit.Connectors.Events

Methods

list(, , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events

List Events

get(, , , , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events/{event_t}.{event_n}

Get Event

MagicTransit.Connectors.Events.Latest

Methods

list(, , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events/latest

Get latest Events

MagicTransit.Connectors.Snapshots

Methods

list(, , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots

List Snapshots

get(, , , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots/{snapshot_t}

Get Snapshot

MagicTransit.Connectors.Snapshots.Latest

Methods

list(, , ):
get/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots/latest

Get latest Snapshots

Magic Transit

GRE Tunnels

MagicTransit.GRETunnels

Methods

list(, ):
get/accounts/{account_id}/magic/gre_tunnels

Lists GRE tunnels associated with an account.

get(, , ):
get/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}

Lists informtion for a specific GRE tunnel.

create(, ):
post/accounts/{account_id}/magic/gre_tunnels

Creates a new GRE tunnel. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

update(, , ):
put/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}

Updates a specific GRE tunnel. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

delete(, , ):
delete/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}

Disables and removes a specific static GRE tunnel. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

bulkUpdate(, ):
put/accounts/{account_id}/magic/gre_tunnels

Updates multiple GRE tunnels. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

Magic Transit

IPSEC Tunnels

MagicTransit.IPSECTunnels

Methods

list(, ):
get/accounts/{account_id}/magic/ipsec_tunnels

Lists IPsec tunnels associated with an account.

get(, , ):
get/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}

Lists details for a specific IPsec tunnel.

create(, ):
post/accounts/{account_id}/magic/ipsec_tunnels

Creates a new IPsec tunnel associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

update(, , ):
put/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}

Updates a specific IPsec tunnel associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

delete(, , ):
delete/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}

Disables and removes a specific static IPsec Tunnel associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

bulkUpdate(, ):
put/accounts/{account_id}/magic/ipsec_tunnels

Update multiple IPsec tunnels associated with an account. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes.

pskGenerate(, , ):
post/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}/psk_generate

Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session. Use ?validate_only=true as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a safe place.

Domain types

PSKMetadata{…}

The PSK metadata that includes when the PSK was generated.

MagicTransit.PCAPs

Methods

list(, ): <>
get/accounts/{account_id}/pcaps

Lists all packet capture requests for an account.

get(, , ):
get/accounts/{account_id}/pcaps/{pcap_id}

Get information for a PCAP request by id.

create(, ):
post/accounts/{account_id}/pcaps

Create new PCAP request for account.

stop(, , ): void
put/accounts/{account_id}/pcaps/{pcap_id}/stop

Stop full PCAP.

Domain types

PCAP{…}
PCAPFilter{…}

The packet capture filter. When this field is empty, all packets are captured.

MagicTransit.PCAPs.Download

Methods

get(, , ):
get/accounts/{account_id}/pcaps/{pcap_id}/download

Download PCAP information into a file. Response is a binary PCAP file.

MagicTransit.PCAPs.OwnershipResource

Methods

get(, ): <>
get/accounts/{account_id}/pcaps/ownership

List all buckets configured for use with PCAPs API.

create(, ):
post/accounts/{account_id}/pcaps/ownership

Adds an AWS or GCP bucket to use with full packet captures.

delete(, , ): void
delete/accounts/{account_id}/pcaps/ownership/{ownership_id}

Deletes buckets added to the packet captures API.

validate(, ):
post/accounts/{account_id}/pcaps/ownership/validate

Validates buckets added to the packet captures API.

Domain types

Ownership{…}

MagicTransit.Routes

Methods

list(, ):
get/accounts/{account_id}/magic/routes

List all Magic static routes.

get(, , ):
get/accounts/{account_id}/magic/routes/{route_id}

Get a specific Magic static route.

create(, ):
post/accounts/{account_id}/magic/routes

Creates a new Magic static route. Use ?validate_only=true as an optional query parameter to run validation only without persisting changes.

update(, , ):
put/accounts/{account_id}/magic/routes/{route_id}

Update a specific Magic static route. Use ?validate_only=true as an optional query parameter to run validation only without persisting changes.

delete(, , ):
delete/accounts/{account_id}/magic/routes/{route_id}

Disable and remove a specific Magic static route.

bulkUpdate(, ):
put/accounts/{account_id}/magic/routes

Update multiple Magic static routes. Use ?validate_only=true as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.

empty(, ):
delete/accounts/{account_id}/magic/routes

Delete multiple Magic static routes.

Domain types

Scope{…}

Used only for ECMP routes.

MagicTransit.Sites

Methods

list(, ): <>
get/accounts/{account_id}/magic/sites

Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.

get(, , ):
get/accounts/{account_id}/magic/sites/{site_id}

Get a specific Site.

create(, ):
post/accounts/{account_id}/magic/sites

Creates a new Site

update(, , ):
put/accounts/{account_id}/magic/sites/{site_id}

Update a specific Site.

edit(, , ):
patch/accounts/{account_id}/magic/sites/{site_id}

Patch a specific Site.

delete(, , ):
delete/accounts/{account_id}/magic/sites/{site_id}

Remove a specific Site.

Domain types

Site{…}
SiteLocation{…}

Location of site in latitude and longitude.

MagicTransit.Sites.ACLs

Methods

list(, , ): <>
get/accounts/{account_id}/magic/sites/{site_id}/acls

Lists Site ACLs associated with an account.

get(, , , ):
get/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}

Get a specific Site ACL.

create(, , ):
post/accounts/{account_id}/magic/sites/{site_id}/acls

Creates a new Site ACL.

update(, , , ):
put/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}

Update a specific Site ACL.

edit(, , , ):
patch/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}

Patch a specific Site ACL.

delete(, , , ):
delete/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}

Remove a specific Site ACL.

Domain types

ACL{…}

Bidirectional ACL policy for network traffic within a site.

ACLConfiguration{…}
AllowedProtocol = "tcp" | "udp" | "icmp"

Array of allowed communication protocols between configured LANs. If no protocols are provided, all protocols are allowed.

Subnet = string

A valid IPv4 address.

MagicTransit.Sites.LANs

Methods

list(, , ): <>
get/accounts/{account_id}/magic/sites/{site_id}/lans

Lists Site LANs associated with an account.

get(, , , ):
get/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}

Get a specific Site LAN.

create(, , ): <>
post/accounts/{account_id}/magic/sites/{site_id}/lans

Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.

update(, , , ):
put/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}

Update a specific Site LAN.

edit(, , , ):
patch/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}

Patch a specific Site LAN.

delete(, , , ):
delete/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}

Remove a specific Site LAN.

Domain types

DHCPRelay{…}
DHCPServer{…}
LAN{…}
LANStaticAddressing{…}

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

Nat{…}
RoutedSubnet{…}

MagicTransit.Sites.WANs

Methods

list(, , ): <>
get/accounts/{account_id}/magic/sites/{site_id}/wans

Lists Site WANs associated with an account.

get(, , , ):
get/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}

Get a specific Site WAN.

create(, , ): <>
post/accounts/{account_id}/magic/sites/{site_id}/wans

Creates a new Site WAN.

update(, , , ):
put/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}

Update a specific Site WAN.

edit(, , , ):
patch/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}

Patch a specific Site WAN.

delete(, , , ):
delete/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}

Remove a specific Site WAN.

Domain types

WAN{…}
WANStaticAddressing{…}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.