Skip to content
Start here

Retrieve a list of all slots matching the specified parameters

client.NetworkInterconnects.Slots.List(ctx, params) (*SlotListResponse, error)
GET/accounts/{account_id}/cni/slots

Retrieve a list of all slots matching the specified parameters

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 SlotListParams
AccountID param.Field[string]

Path param: Customer account tag

AddressContains param.Field[string]optional

Query param: If specified, only show slots with the given text in their address field

Cursor param.Field[int64]optional

Query param

formatint32
Limit param.Field[int64]optional

Query param

minimum0
Occupied param.Field[bool]optional

Query param: If specified, only show slots with a specific occupied/unoccupied state

Site param.Field[string]optional

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

Speed param.Field[string]optional

Query param: If specified, only show slots that support the given speed

ReturnsExpand Collapse
type SlotListResponse struct{…}
Items []SlotListResponseItem
ID string

Slot ID

formatuuid
Facility SlotListResponseItemsFacility
Address []string
Name string
Occupied bool

Whether the slot is occupied or not

Site string
Speed string
Account stringoptional

Customer account tag

Retrieve a list of all slots matching the specified parameters

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"),
  )
  slots, err := client.NetworkInterconnects.Slots.List(context.TODO(), network_interconnects.SlotListParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", slots.Items)
}
{
  "items": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "facility": {
        "address": [
          "string"
        ],
        "name": "name"
      },
      "occupied": true,
      "site": "site",
      "speed": "speed",
      "account": "account"
    }
  ],
  "next": 0
}
Returns Examples
{
  "items": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "facility": {
        "address": [
          "string"
        ],
        "name": "name"
      },
      "occupied": true,
      "site": "site",
      "speed": "speed",
      "account": "account"
    }
  ],
  "next": 0
}