# Interconnects ## List existing interconnects `client.networkInterconnects.interconnects.list(InterconnectListParamsparams, RequestOptionsoptions?): InterconnectListResponse` **get** `/accounts/{account_id}/cni/interconnects` List existing interconnects ### Parameters - `params: InterconnectListParams` - `account_id: string` Path param: Customer account tag - `cursor?: number | null` Query param - `limit?: number | null` Query param - `site?: string | null` Query param: If specified, only show interconnects located at the given site - `type?: string | null` Query param: If specified, only show interconnects of the given type ### Returns - `InterconnectListResponse` - `items: Array` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` - `next?: number | null` ### 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 interconnects = await client.networkInterconnects.interconnects.list({ account_id: 'account_id', }); console.log(interconnects.items); ``` #### Response ```json { "items": [ { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ], "next": 0 } ``` ## Get information about an interconnect object `client.networkInterconnects.interconnects.get(stringicon, InterconnectGetParamsparams, RequestOptionsoptions?): InterconnectGetResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}` Get information about an interconnect object ### Parameters - `icon: string` - `params: InterconnectGetParams` - `account_id: string` Customer account tag ### Returns - `InterconnectGetResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### 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 interconnect = await client.networkInterconnects.interconnects.get('icon', { account_id: 'account_id', }); console.log(interconnect); ``` #### Response ```json { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ``` ## Create a new interconnect `client.networkInterconnects.interconnects.create(InterconnectCreateParamsparams, RequestOptionsoptions?): InterconnectCreateResponse` **post** `/accounts/{account_id}/cni/interconnects` Create a new interconnect ### Parameters - `InterconnectCreateParams = NscInterconnectCreatePhysicalBody | NscInterconnectCreateGcpPartnerBody` - `InterconnectCreateParamsBase` - `NscInterconnectCreatePhysicalBody extends InterconnectCreateParamsBase` - `NscInterconnectCreateGcpPartnerBody extends InterconnectCreateParamsBase` ### Returns - `InterconnectCreateResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### 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 interconnect = await client.networkInterconnects.interconnects.create({ account_id: 'account_id', account: 'account', slot_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', type: 'type', }); console.log(interconnect); ``` #### Response ```json { "account": "account", "facility": { "address": [ "string" ], "name": "name" }, "name": "name", "site": "site", "slot_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "speed": "speed", "type": "type", "owner": "owner" } ``` ## Delete an interconnect object `client.networkInterconnects.interconnects.delete(stringicon, InterconnectDeleteParamsparams, RequestOptionsoptions?): void` **delete** `/accounts/{account_id}/cni/interconnects/{icon}` Delete an interconnect object ### Parameters - `icon: string` - `params: InterconnectDeleteParams` - `account_id: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.networkInterconnects.interconnects.delete('icon', { account_id: 'account_id' }); ``` ## Generate the Letter of Authorization (LOA) for a given interconnect `client.networkInterconnects.interconnects.loa(stringicon, InterconnectLOAParamsparams, RequestOptionsoptions?): void` **get** `/accounts/{account_id}/cni/interconnects/{icon}/loa` Generate the Letter of Authorization (LOA) for a given interconnect ### Parameters - `icon: string` - `params: InterconnectLOAParams` - `account_id: string` Customer account tag ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.networkInterconnects.interconnects.loa('icon', { account_id: 'account_id' }); ``` ## Get the current status of an interconnect object `client.networkInterconnects.interconnects.status(stringicon, InterconnectStatusParamsparams, RequestOptionsoptions?): InterconnectStatusResponse` **get** `/accounts/{account_id}/cni/interconnects/{icon}/status` Get the current status of an interconnect object ### Parameters - `icon: string` - `params: InterconnectStatusParams` - `account_id: string` Customer account tag ### Returns - `InterconnectStatusResponse = Pending | Down | Unhealthy | Healthy` - `Pending` - `state: "Pending"` - `"Pending"` - `Down` - `state: "Down"` - `"Down"` - `reason?: string | null` Diagnostic information, if available - `Unhealthy` - `state: "Unhealthy"` - `"Unhealthy"` - `reason?: string | null` Diagnostic information, if available - `Healthy` - `state: "Healthy"` - `"Healthy"` ### 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 response = await client.networkInterconnects.interconnects.status('icon', { account_id: 'account_id', }); console.log(response); ``` #### Response ```json { "state": "Pending" } ``` ## Domain Types ### Interconnect List Response - `InterconnectListResponse` - `items: Array` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` - `next?: number | null` ### Interconnect Get Response - `InterconnectGetResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Interconnect Create Response - `InterconnectCreateResponse = NscInterconnectPhysicalBody | NscInterconnectGcpPartnerBody` - `NscInterconnectPhysicalBody` - `account: string` - `facility: Facility` - `address: Array` - `name: string` - `name: string` - `site: string` A Cloudflare site name. - `slot_id: string` - `speed: string` - `type: string` - `owner?: string` - `NscInterconnectGcpPartnerBody` - `account: string` - `name: string` - `region: string` - `type: string` - `owner?: string` - `speed?: "50M" | "100M" | "200M" | 9 more` Bandwidth structure as visible through the customer-facing API. - `"50M"` - `"100M"` - `"200M"` - `"300M"` - `"400M"` - `"500M"` - `"1G"` - `"2G"` - `"5G"` - `"10G"` - `"20G"` - `"50G"` ### Interconnect Status Response - `InterconnectStatusResponse = Pending | Down | Unhealthy | Healthy` - `Pending` - `state: "Pending"` - `"Pending"` - `Down` - `state: "Down"` - `"Down"` - `reason?: string | null` Diagnostic information, if available - `Unhealthy` - `state: "Unhealthy"` - `"Unhealthy"` - `reason?: string | null` Diagnostic information, if available - `Healthy` - `state: "Healthy"` - `"Healthy"`