Skip to content
Start here

List existing interconnects

client.NetworkInterconnects.Interconnects.List(ctx, params) (*InterconnectListResponse, error)
GET/accounts/{account_id}/cni/interconnects

List existing interconnects

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 ReadMagic Transit ReadMagic Transit Write
ParametersExpand Collapse
params InterconnectListParams
AccountID param.Field[string]

Path param: Customer account tag

Cursor param.Field[int64]optional

Query param

formatint32
Limit param.Field[int64]optional

Query param

minimum0
Site param.Field[string]optional

Query param: If specified, only show interconnects located at the given site

Type param.Field[string]optional

Query param: If specified, only show interconnects of the given type

ReturnsExpand Collapse
type InterconnectListResponse struct{…}
Items []InterconnectListResponseItem
One of the following:
type InterconnectListResponseItemsNscInterconnectPhysicalBody struct{…}
Account string
Facility InterconnectListResponseItemsNscInterconnectPhysicalBodyFacility
Address []string
Name string
Name string
Site string

A Cloudflare site name.

SlotID string
formatuuid
Speed string
Type string
Owner stringoptional
type InterconnectListResponseItemsNscInterconnectGcpPartnerBody struct{…}
Account string
Name string
Region string
Type string
Owner stringoptional
Speed InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeedoptional

Bandwidth structure as visible through the customer-facing API.

One of the following:
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed50M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "50M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed100M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "100M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed200M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "200M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed300M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "300M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed400M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "400M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed500M InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "500M"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed1G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "1G"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed2G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "2G"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed5G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "5G"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed10G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "10G"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed20G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "20G"
const InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed50G InterconnectListResponseItemsNscInterconnectGcpPartnerBodySpeed = "50G"

List existing interconnects

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/network_interconnects"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  interconnects, err := client.NetworkInterconnects.Interconnects.List(context.TODO(), network_interconnects.InterconnectListParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", interconnects.Items)
}
{
  "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
}
Returns Examples
{
  "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
}