Incus networks API

The networks API from Incus — 5 operation(s) for networks.

Operations 10

GET /1.0/networks Get the networks #
POST /1.0/networks Add a network #
DELETE /1.0/networks/{name} Delete the network #
GET /1.0/networks/{name} Get the network #
PATCH /1.0/networks/{name} Partially update the network #
POST /1.0/networks/{name} Rename the network #
PUT /1.0/networks/{name} Update the network #
GET /1.0/networks/{name}/leases Get the DHCP leases #
GET /1.0/networks/{name}/state Get the network state #
GET /1.0/networks?recursion=1 Get the networks #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/incus-networks-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

incus-networks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: lxc-devel@lists.linuxcontainers.org
    name: Incus upstream
    url: https://github.com/lxc/incus
  description: 'This is the REST API used by all Incus clients.

    Internal endpoints aren''t included in this documentation.


    The Incus API is available over both a local unix+http and remote https API.

    Authentication for local users relies on group membership and access to the unix socket.

    For remote users, the default authentication method is TLS client

    certificates.'
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  title: Incus external REST certificates Networks API
  version: '1.0'
tags:
- name: networks
paths:
  /1.0/networks:
    get:
      description: Returns a list of networks (URLs).
      operationId: networks_get
      parameters:
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Retrieve networks from all projects
        example: true
        in: query
        name: all-projects
        schema:
          type: boolean
      - description: Collection filter
        example: default
        in: query
        name: filter
        schema:
          type: string
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                description: Sync response
                properties:
                  metadata:
                    description: List of endpoints
                    example: "[\n  \"/1.0/networks/mybr0\",\n  \"/1.0/networks/mybr1\"\n]"
                    items:
                      type: string
                    type: array
                  status:
                    description: Status description
                    example: Success
                    type: string
                  status_code:
                    description: Status code
                    example: 200
                    type: integer
                  type:
                    description: Response type
                    example: sync
                    type: string
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get the networks
      tags:
      - networks
    post:
      description: 'Creates a new network.

        When clustered, most network types require individual POST for each cluster member prior to a global POST.'
      operationId: networks_post
      parameters:
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/EmptySyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Add a network
      tags:
      - networks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworksPost'
        description: Network
        required: true
  /1.0/networks/{name}:
    delete:
      description: Removes the network.
      operationId: network_delete
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/EmptySyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Delete the network
      tags:
      - networks
    get:
      description: Gets a specific network.
      operationId: network_get
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          description: Network
          content:
            application/json:
              schema:
                description: Sync response
                properties:
                  metadata:
                    $ref: '#/components/schemas/Network'
                  status:
                    description: Status description
                    example: Success
                    type: string
                  status_code:
                    description: Status code
                    example: 200
                    type: integer
                  type:
                    description: Response type
                    example: sync
                    type: string
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get the network
      tags:
      - networks
    patch:
      description: Updates a subset of the network configuration.
      operationId: network_patch
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/EmptySyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Partially update the network
      tags:
      - networks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkPut'
        description: Network configuration
        required: true
    post:
      description: Renames an existing network.
      operationId: network_post
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/EmptySyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Rename the network
      tags:
      - networks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkPost'
        description: Network rename request
        required: true
    put:
      description: Updates the entire network configuration.
      operationId: network_put
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/EmptySyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Update the network
      tags:
      - networks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkPut'
        description: Network configuration
        required: true
  /1.0/networks/{name}/leases:
    get:
      description: Returns a list of DHCP leases for the network.
      operationId: networks_leases_get
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                description: Sync response
                properties:
                  metadata:
                    description: List of DHCP leases
                    items:
                      $ref: '#/components/schemas/NetworkLease'
                    type: array
                  status:
                    description: Status description
                    example: Success
                    type: string
                  status_code:
                    description: Status code
                    example: 200
                    type: integer
                  type:
                    description: Response type
                    example: sync
                    type: string
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get the DHCP leases
      tags:
      - networks
  /1.0/networks/{name}/state:
    get:
      description: Returns the current network state information.
      operationId: networks_state_get
      parameters:
      - description: Network name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Cluster member name
        example: server01
        in: query
        name: target
        schema:
          type: string
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                description: Sync response
                properties:
                  metadata:
                    $ref: '#/components/schemas/NetworkState'
                  status:
                    description: Status description
                    example: Success
                    type: string
                  status_code:
                    description: Status code
                    example: 200
                    type: integer
                  type:
                    description: Response type
                    example: sync
                    type: string
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get the network state
      tags:
      - networks
  /1.0/networks?recursion=1:
    get:
      description: Returns a list of networks (structs).
      operationId: networks_get_recursion1
      parameters:
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Retrieve networks from all projects
        example: true
        in: query
        name: all-projects
        schema:
          type: boolean
      - description: Collection filter
        example: default
        in: query
        name: filter
        schema:
          type: string
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                description: Sync response
                properties:
                  metadata:
                    description: List of networks
                    items:
                      $ref: '#/components/schemas/Network'
                    type: array
                  status:
                    description: Status description
                    example: Success
                    type: string
                  status_code:
                    description: Status code
                    example: 200
                    type: integer
                  type:
                    description: Response type
                    example: sync
                    type: string
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get the networks
      tags:
      - networks
components:
  schemas:
    NetworkState:
      description: NetworkState represents the network state
      properties:
        addresses:
          description: List of addresses
          items:
            $ref: '#/components/schemas/NetworkStateAddress'
          type: array
          x-go-name: Addresses
        bond:
          $ref: '#/components/schemas/NetworkStateBond'
        bridge:
          $ref: '#/components/schemas/NetworkStateBridge'
        counters:
          $ref: '#/components/schemas/NetworkStateCounters'
        hwaddr:
          description: MAC address
          example: 10:66:6a:5a:83:57
          type: string
          x-go-name: Hwaddr
        mtu:
          description: MTU
          example: 1500
          format: int64
          type: integer
          x-go-name: Mtu
        ovn:
          $ref: '#/components/schemas/NetworkStateOVN'
        state:
          description: Link state
          example: up
          type: string
          x-go-name: State
        type:
          description: Interface type
          example: broadcast
          type: string
          x-go-name: Type
        vlan:
          $ref: '#/components/schemas/NetworkStateVLAN'
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateBond:
      description: NetworkStateBond represents bond specific state
      properties:
        down_delay:
          description: Delay on link down (ms)
          example: 0
          format: uint64
          type: integer
          x-go-name: DownDelay
        lower_devices:
          description: List of devices that are part of the bond
          example:
          - eth0
          - eth1
          items:
            type: string
          type: array
          x-go-name: LowerDevices
        mii_frequency:
          description: How often to check for link state (ms)
          example: 100
          format: uint64
          type: integer
          x-go-name: MIIFrequency
        mii_state:
          description: Bond link state
          example: up
          type: string
          x-go-name: MIIState
        mode:
          description: Bonding mode
          example: 802.3ad
          type: string
          x-go-name: Mode
        transmit_policy:
          description: Transmit balancing policy
          example: layer3+4
          type: string
          x-go-name: TransmitPolicy
        up_delay:
          description: Delay on link up (ms)
          example: 0
          format: uint64
          type: integer
          x-go-name: UpDelay
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkPut:
      description: NetworkPut represents the modifiable fields of a network
      properties:
        config:
          description: Network configuration map (refer to doc/networks.md)
          example:
            ipv4.address: 10.0.0.1/24
            ipv4.nat: 'true'
            ipv6.address: none
          type: object
          x-go-name: Config
        description:
          description: Description of the profile
          example: My new bridge
          type: string
          x-go-name: Description
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateVLAN:
      description: NetworkStateVLAN represents VLAN specific state
      properties:
        lower_device:
          description: Parent device
          example: eth0
          type: string
          x-go-name: LowerDevice
        vid:
          description: VLAN ID
          example: 100
          format: uint64
          type: integer
          x-go-name: VID
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    Network:
      description: Network represents a network
      properties:
        config:
          description: Network configuration map (refer to doc/networks.md)
          example:
            ipv4.address: 10.0.0.1/24
            ipv4.nat: 'true'
            ipv6.address: none
          type: object
          x-go-name: Config
        description:
          description: Description of the profile
          example: My new bridge
          type: string
          x-go-name: Description
        locations:
          description: Cluster members on which the network has been defined
          example:
          - server01
          - server02
          - server03
          items:
            type: string
          readOnly: true
          type: array
          x-go-name: Locations
        managed:
          description: Whether this is a managed network
          example: true
          readOnly: true
          type: boolean
          x-go-name: Managed
        name:
          description: The network name
          example: mybr0
          readOnly: true
          type: string
          x-go-name: Name
        project:
          description: Project name
          example: project1
          type: string
          x-go-name: Project
        status:
          description: The state of the network (for managed network in clusters)
          example: Created
          readOnly: true
          type: string
          x-go-name: Status
        type:
          description: The network type
          example: bridge
          readOnly: true
          type: string
          x-go-name: Type
        used_by:
          description: List of URLs of objects using this profile
          example:
          - /1.0/profiles/default
          - /1.0/instances/c1
          items:
            type: string
          readOnly: true
          type: array
          x-go-name: UsedBy
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateAddress:
      description: NetworkStateAddress represents a network address
      properties:
        address:
          description: IP address
          example: 10.0.0.1
          type: string
          x-go-name: Address
        family:
          description: Address family
          example: inet
          type: string
          x-go-name: Family
        netmask:
          description: IP netmask (CIDR)
          example: '24'
          type: string
          x-go-name: Netmask
        scope:
          description: Address scope
          example: global
          type: string
          x-go-name: Scope
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkLease:
      description: NetworkLease represents a DHCP lease
      properties:
        address:
          description: The IP address
          example: 10.0.0.98
          type: string
          x-go-name: Address
        hostname:
          description: The hostname associated with the record
          example: c1
          type: string
          x-go-name: Hostname
        hwaddr:
          description: The MAC address
          example: 10:66:6a:2c:89:d9
          type: string
          x-go-name: Hwaddr
        location:
          description: What cluster member this record was found on
          example: server01
          type: string
          x-go-name: Location
        type:
          description: The type of record (static or dynamic)
          example: dynamic
          type: string
          x-go-name: Type
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkPost:
      description: NetworkPost represents the fields required to rename a network
      properties:
        name:
          description: The new name for the network
          example: mybr1
          type: string
          x-go-name: Name
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworksPost:
      description: NetworksPost represents the fields of a new network
      properties:
        config:
          description: Network configuration map (refer to doc/networks.md)
          example:
            ipv4.address: 10.0.0.1/24
            ipv4.nat: 'true'
            ipv6.address: none
          type: object
          x-go-name: Config
        description:
          description: Description of the profile
          example: My new bridge
          type: string
          x-go-name: Description
        name:
          description: The name of the new network
          example: mybr1
          type: string
          x-go-name: Name
        type:
          description: The network type (refer to doc/networks.md)
          example: bridge
          type: string
          x-go-name: Type
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateCounters:
      description: NetworkStateCounters represents packet counters
      properties:
        bytes_received:
          description: Number of bytes received
          example: 250542118
          format: int64
          type: integer
          x-go-name: BytesReceived
        bytes_sent:
          description: Number of bytes sent
          example: 17524040140
          format: int64
          type: integer
          x-go-name: BytesSent
        packets_received:
          description: Number of packets received
          example: 1182515
          format: int64
          type: integer
          x-go-name: PacketsReceived
        packets_sent:
          description: Number of packets sent
          example: 1567934
          format: int64
          type: integer
          x-go-name: PacketsSent
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateOVN:
      description: NetworkStateOVN represents OVN specific state
      properties:
        chassis:
          description: OVN network chassis name
          example: server01
          type: string
          x-go-name: Chassis
        logical_router:
          description: OVN logical router name
          example: incus-net1-lr
          type: string
          x-go-name: LogicalRouter
        logical_switch:
          description: OVN logical switch name
          example: incus-net1-ls-int
          type: string
          x-go-name: LogicalSwitch
        uplink_ipv4:
          description: OVN network uplink ipv4 address
          example: 10.0.0.1
          type: string
          x-go-name: UplinkIPv4
        uplink_ipv6:
          description: OVN network uplink ipv6 address
          example: 2001:0000:130F:0000:0000:09C0:876A:130B.
          type: string
          x-go-name: UplinkIPv6
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
    NetworkStateBridge:
      description: NetworkStateBridge represents bridge specific state
      properties:
        forward_delay:
          description: Delay on port join (ms)
          example: 1500
          format: uint64
          type: integer
          x-go-name: ForwardDelay
        id:
          description: Bridge ID
          example: 8000.0a0f7c6edbd9
          type: string
          x-go-name: ID
        stp:
          description: Whether STP is enabled
          example: false
          type: boolean
          x-go-name: STP
        upper_devices:
          description: List of devices that are in the bridge
          example:
          - eth0
          - eth1
          items:
            type: string
          type: array
          x-go-name: UpperDevices
        vlan_default:
          description: Default VLAN ID
          example: 1
          format: uint64
          type: integer
          x-go-name: VLANDefault
        vlan_filtering:
          description: Whether VLAN filtering is enabled
          example: false
          type: boolean
          x-go-name: VLANFiltering
      type: object
      x-go-package: github.com/lxc/incus/v7/shared/api
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            properties:
              error:
                example: internal server error
                type: string
                x-go-name: Error
              error_code:
                example: 500
                format: int64
                type: integer
                x-go-name: ErrorCode
              type:
                example: error
                type: string
                x-go-name: Type
            type: object
    PreconditionFailed:
      description: Precondition Failed
      content:
        application/json:
          schema:
            properties:
              error:
                example: precondition failed
                type: string
                x-go-name: Error
              error_code:
                example: 412
                format: int64
                type: integer
                x-go-name: ErrorCode
              type:
                example: error
                type: string
                x-go-name: Type
            type: object
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            properties:
              error:
                example: not authorized
                type: string
                x-go-name: Error
              error_code:
                example: 403
                format: int64
                type: integer
                x-go-name: ErrorCode
              type:
                example: error
                type: string
                x-go-name: Type
            type: object
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            properties:
              error:
                example: bad request
                type: string
                x-go-name: Error
              error_code:
                example: 400
                format: int64
                type: integer
                x-go-name: ErrorCode
              type:
                example: error
                type: string
                x-go-name: Type
            type: object
    EmptySyncResponse:
      description: Empty sync response
      content:
        application/json:
          schema:
            properties:
              status:
                example: Success
                type: string
                x-go-name: Status
              status_code:
                example: 200
                format: int64
                type: integer
                x-go-name: StatusCode
              type:
                example: sync
                type: string
                x-go-name: Type
            type: object