# Cf1 Sites ## List CF1 Sites `client.magicTransit.cf1Sites.list(Cf1SiteListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/magic/cf1_sites` Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates. ### Parameters - `params: Cf1SiteListParams` - `account_id: string` Identifier ### Returns - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const cf1Site of client.magicTransit.cf1Sites.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(cf1Site.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "name": "Pad 34", "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "description": "Launch Pad 34", "location": { "lat": 28.521339842093845, "long": -80.56092644815843, "name": "Cape Canaveral" }, "modified_on": "2019-12-27T18:11:19.117Z" } ], "success": true } ``` ## Get CF1 Site `client.magicTransit.cf1Sites.get(stringcf1SiteId, Cf1SiteGetParamsparams, RequestOptionsoptions?): Cf1Site` **get** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}` Gets a specific CF1 Site for an account. ### Parameters - `cf1SiteId: string` Identifier - `params: Cf1SiteGetParams` - `account_id: string` Identifier ### Returns - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cf1Site = await client.magicTransit.cf1Sites.get('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(cf1Site.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "name": "Pad 34", "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "description": "Launch Pad 34", "location": { "lat": 28.521339842093845, "long": -80.56092644815843, "name": "Cape Canaveral" }, "modified_on": "2019-12-27T18:11:19.117Z" }, "success": true } ``` ## Create CF1 Sites `client.magicTransit.cf1Sites.create(Cf1SiteCreateParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/magic/cf1_sites` Creates new CF1 Sites for an account. Each site must have a unique name within the account. ### Parameters - `params: Cf1SiteCreateParams` - `account_id: string` Path param: Identifier - `body: Array` Body param - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Returns - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const cf1Site of client.magicTransit.cf1Sites.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: [{ name: 'Pad 34' }], })) { console.log(cf1Site.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "name": "Pad 34", "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "description": "Launch Pad 34", "location": { "lat": 28.521339842093845, "long": -80.56092644815843, "name": "Cape Canaveral" }, "modified_on": "2019-12-27T18:11:19.117Z" } ], "success": true } ``` ## Update CF1 Site `client.magicTransit.cf1Sites.update(stringcf1SiteId, Cf1SiteUpdateParamsparams, RequestOptionsoptions?): Cf1Site` **patch** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}` Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values. ### Parameters - `cf1SiteId: string` Identifier - `params: Cf1SiteUpdateParams` - `account_id: string` Path param: Identifier - `description?: string` Body param: A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` Body param - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `name?: string` Body param: A human-provided name describing the CF1 Site that should be unique within the account. ### Returns - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cf1Site = await client.magicTransit.cf1Sites.update('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(cf1Site.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "name": "Pad 34", "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "description": "Launch Pad 34", "location": { "lat": 28.521339842093845, "long": -80.56092644815843, "name": "Cape Canaveral" }, "modified_on": "2019-12-27T18:11:19.117Z" }, "success": true } ``` ## Delete CF1 Site `client.magicTransit.cf1Sites.delete(stringcf1SiteId, Cf1SiteDeleteParamsparams, RequestOptionsoptions?): Cf1Site` **delete** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}` Deletes a specific CF1 Site for an account. ### Parameters - `cf1SiteId: string` Identifier - `params: Cf1SiteDeleteParams` - `account_id: string` Identifier ### Returns - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const cf1Site = await client.magicTransit.cf1Sites.delete('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(cf1Site.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "name": "Pad 34", "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "description": "Launch Pad 34", "location": { "lat": 28.521339842093845, "long": -80.56092644815843, "name": "Cape Canaveral" }, "modified_on": "2019-12-27T18:11:19.117Z" }, "success": true } ``` ## Domain Types ### Cf1 Site - `Cf1Site` - `name: string` A human-provided name describing the CF1 Site that should be unique within the account. - `id?: string` Identifier - `created_on?: string` - `description?: string` A human-provided description of the CF1 Site. - `location?: Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. - `modified_on?: string` ### Cf1 Site Location - `Cf1SiteLocation` - `lat?: number` Latitude of the CF1 Site. - `long?: number` Longitude of the CF1 Site. - `name?: string` Name of nearest town, city, or village. # Ramps ## List CF1 Site Ramps `client.magicTransit.cf1Sites.ramps.list(stringcf1SiteId, RampListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps` Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links. ### Parameters - `cf1SiteId: string` Identifier - `params: RampListParams` - `account_id: string` Identifier ### Returns - `Ramp` - `id: string` Identifier - `created_on: string` - `modified_on: string` - `name: string` A human-provided name describing the ramp that should be unique within the CF1 Site. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` - `description?: string` A human-provided description of the ramp. - `gre?: GRE` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `gre_interconnect?: GREInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `ipsec?: IPSEC` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mconn?: Mconn` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mpls_interconnect?: MplsInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const ramp of client.magicTransit.cf1Sites.ramps.list( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, )) { console.log(ramp.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "modified_on": "2019-12-27T18:11:19.117Z", "name": "primary_gre_ramp", "type": "gre", "description": "Primary CF GRE tunnel", "gre": { "managed_by": "managed_by" }, "gre_interconnect": { "managed_by": "managed_by" }, "ipsec": { "managed_by": "managed_by" }, "mconn": { "managed_by": "managed_by" }, "mpls_interconnect": { "managed_by": "managed_by" } } ], "success": true } ``` ## Get CF1 Site Ramp `client.magicTransit.cf1Sites.ramps.get(stringcf1SiteId, stringrampId, RampGetParamsparams, RequestOptionsoptions?): Ramp` **get** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}` Gets a specific ramp for a CF1 Site. ### Parameters - `cf1SiteId: string` Identifier - `rampId: string` Identifier - `params: RampGetParams` - `account_id: string` Identifier ### Returns - `Ramp` - `id: string` Identifier - `created_on: string` - `modified_on: string` - `name: string` A human-provided name describing the ramp that should be unique within the CF1 Site. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` - `description?: string` A human-provided description of the ramp. - `gre?: GRE` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `gre_interconnect?: GREInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `ipsec?: IPSEC` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mconn?: Mconn` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mpls_interconnect?: MplsInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const ramp = await client.magicTransit.cf1Sites.ramps.get( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(ramp.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "modified_on": "2019-12-27T18:11:19.117Z", "name": "primary_gre_ramp", "type": "gre", "description": "Primary CF GRE tunnel", "gre": { "managed_by": "managed_by" }, "gre_interconnect": { "managed_by": "managed_by" }, "ipsec": { "managed_by": "managed_by" }, "mconn": { "managed_by": "managed_by" }, "mpls_interconnect": { "managed_by": "managed_by" } }, "success": true } ``` ## Create CF1 Site Ramps `client.magicTransit.cf1Sites.ramps.create(stringcf1SiteId, RampCreateParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps` Creates ramps (network connections) for a CF1 Site. ### Parameters - `cf1SiteId: string` Identifier - `params: RampCreateParams` - `account_id: string` Path param: Identifier - `body: Array` Body param - `source_ramp_id: string` Identifier of the source network resource to associate as a ramp. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` ### Returns - `Ramp` - `id: string` Identifier - `created_on: string` - `modified_on: string` - `name: string` A human-provided name describing the ramp that should be unique within the CF1 Site. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` - `description?: string` A human-provided description of the ramp. - `gre?: GRE` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `gre_interconnect?: GREInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `ipsec?: IPSEC` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mconn?: Mconn` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mpls_interconnect?: MplsInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const ramp of client.magicTransit.cf1Sites.ramps.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: [{ source_ramp_id: '023e105f4ecef8ad9ca31a8372d0c353', type: 'gre' }], }, )) { console.log(ramp.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "modified_on": "2019-12-27T18:11:19.117Z", "name": "primary_gre_ramp", "type": "gre", "description": "Primary CF GRE tunnel", "gre": { "managed_by": "managed_by" }, "gre_interconnect": { "managed_by": "managed_by" }, "ipsec": { "managed_by": "managed_by" }, "mconn": { "managed_by": "managed_by" }, "mpls_interconnect": { "managed_by": "managed_by" } } ], "success": true } ``` ## Delete CF1 Site Ramp `client.magicTransit.cf1Sites.ramps.delete(stringcf1SiteId, stringrampId, RampDeleteParamsparams, RequestOptionsoptions?): Ramp` **delete** `/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}` Deletes a specific ramp from a CF1 Site. ### Parameters - `cf1SiteId: string` Identifier - `rampId: string` Identifier - `params: RampDeleteParams` - `account_id: string` Identifier ### Returns - `Ramp` - `id: string` Identifier - `created_on: string` - `modified_on: string` - `name: string` A human-provided name describing the ramp that should be unique within the CF1 Site. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` - `description?: string` A human-provided description of the ramp. - `gre?: GRE` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `gre_interconnect?: GREInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `ipsec?: IPSEC` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mconn?: Mconn` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mpls_interconnect?: MplsInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const ramp = await client.magicTransit.cf1Sites.ramps.delete( '023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(ramp.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "modified_on": "2019-12-27T18:11:19.117Z", "name": "primary_gre_ramp", "type": "gre", "description": "Primary CF GRE tunnel", "gre": { "managed_by": "managed_by" }, "gre_interconnect": { "managed_by": "managed_by" }, "ipsec": { "managed_by": "managed_by" }, "mconn": { "managed_by": "managed_by" }, "mpls_interconnect": { "managed_by": "managed_by" } }, "success": true } ``` ## Domain Types ### Ramp - `Ramp` - `id: string` Identifier - `created_on: string` - `modified_on: string` - `name: string` A human-provided name describing the ramp that should be unique within the CF1 Site. - `type: RampType` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"` - `description?: string` A human-provided description of the ramp. - `gre?: GRE` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `gre_interconnect?: GREInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `ipsec?: IPSEC` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mconn?: Mconn` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. - `mpls_interconnect?: MplsInterconnect` - `managed_by?: string` URL reference to the source network resource that this ramp is managed by. ### Ramp Type - `RampType = "gre" | "gre_interconnect" | "mpls_interconnect" | 2 more` The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. - `"gre"` - `"gre_interconnect"` - `"mpls_interconnect"` - `"mconn"` - `"ipsec"`