Canonical · Schema

NetworkState

NetworkState represents the network state

CanonicalCloudLinuxOpen SourceUbuntuContainersBare MetalCharmsIdentity

Properties

Name Type Description
addresses array List of addresses
bond object
bridge object
counters object
hwaddr string MAC address
mtu integer MTU
ovn object
state string Link state
type string Interface type
vlan object
View JSON Schema on GitHub

JSON Schema

canonical-network-state-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-network-state-schema.json",
  "title": "NetworkState",
  "description": "NetworkState represents the network state",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canonical-networks-api-openapi.yml#/components/schemas/NetworkState",
  "properties": {
    "addresses": {
      "description": "List of addresses",
      "items": {
        "$ref": "#/$defs/NetworkStateAddress"
      },
      "type": "array",
      "x-go-name": "Addresses"
    },
    "bond": {
      "$ref": "#/$defs/NetworkStateBond"
    },
    "bridge": {
      "$ref": "#/$defs/NetworkStateBridge"
    },
    "counters": {
      "$ref": "#/$defs/NetworkStateCounters"
    },
    "hwaddr": {
      "description": "MAC address",
      "type": "string",
      "x-go-name": "Hwaddr"
    },
    "mtu": {
      "description": "MTU",
      "format": "int64",
      "type": "integer",
      "x-go-name": "Mtu"
    },
    "ovn": {
      "$ref": "#/$defs/NetworkStateOVN"
    },
    "state": {
      "description": "Link state",
      "type": "string",
      "x-go-name": "State"
    },
    "type": {
      "description": "Interface type",
      "type": "string",
      "x-go-name": "Type"
    },
    "vlan": {
      "$ref": "#/$defs/NetworkStateVLAN"
    }
  },
  "type": "object",
  "x-go-package": "github.com/canonical/lxd/shared/api",
  "$defs": {
    "NetworkStateAddress": {
      "description": "NetworkStateAddress represents a network address",
      "properties": {
        "address": {
          "description": "IP address",
          "type": "string",
          "x-go-name": "Address"
        },
        "family": {
          "description": "Address family",
          "type": "string",
          "x-go-name": "Family"
        },
        "netmask": {
          "description": "IP netmask (CIDR)",
          "type": "string",
          "x-go-name": "Netmask"
        },
        "scope": {
          "description": "Address scope",
          "type": "string",
          "x-go-name": "Scope"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "NetworkStateBond": {
      "description": "NetworkStateBond represents bond specific state",
      "properties": {
        "down_delay": {
          "description": "Delay on link down (ms)",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "DownDelay"
        },
        "lower_devices": {
          "description": "List of devices that are part of the bond",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-go-name": "LowerDevices"
        },
        "mii_frequency": {
          "description": "How often to check for link state (ms)",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "MIIFrequency"
        },
        "mii_state": {
          "description": "Bond link state",
          "type": "string",
          "x-go-name": "MIIState"
        },
        "mode": {
          "description": "Bonding mode",
          "type": "string",
          "x-go-name": "Mode"
        },
        "transmit_policy": {
          "description": "Transmit balancing policy",
          "type": "string",
          "x-go-name": "TransmitPolicy"
        },
        "up_delay": {
          "description": "Delay on link up (ms)",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "UpDelay"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "NetworkStateBridge": {
      "description": "NetworkStateBridge represents bridge specific state",
      "properties": {
        "forward_delay": {
          "description": "Delay on port join (ms)",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "ForwardDelay"
        },
        "id": {
          "description": "Bridge ID",
          "type": "string",
          "x-go-name": "ID"
        },
        "stp": {
          "description": "Whether STP is enabled",
          "type": "boolean",
          "x-go-name": "STP"
        },
        "upper_devices": {
          "description": "List of devices that are in the bridge",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-go-name": "UpperDevices"
        },
        "vlan_default": {
          "description": "Default VLAN ID",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "VLANDefault"
        },
        "vlan_filtering": {
          "description": "Whether VLAN filtering is enabled",
          "type": "boolean",
          "x-go-name": "VLANFiltering"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "NetworkStateCounters": {
      "description": "NetworkStateCounters represents packet counters",
      "properties": {
        "bytes_received": {
          "description": "Number of bytes received",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "BytesReceived"
        },
        "bytes_sent": {
          "description": "Number of bytes sent",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "BytesSent"
        },
        "packets_received": {
          "description": "Number of packets received",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "PacketsReceived"
        },
        "packets_sent": {
          "description": "Number of packets sent",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "PacketsSent"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "NetworkStateOVN": {
      "description": "NetworkStateOVN represents OVN specific state",
      "properties": {
        "chassis": {
          "description": "OVN network chassis name",
          "type": "string",
          "x-go-name": "Chassis"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "NetworkStateVLAN": {
      "description": "NetworkStateVLAN represents VLAN specific state",
      "properties": {
        "lower_device": {
          "description": "Parent device",
          "type": "string",
          "x-go-name": "LowerDevice"
        },
        "vid": {
          "description": "VLAN ID",
          "format": "uint64",
          "type": "integer",
          "x-go-name": "VID"
        }
      },
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/canonical-network-state"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.