Canonical Network Allocations API

The network-allocations API from Canonical — 1 operation(s) for network-allocations.

Operations 1

GET /1.0/network-allocations Get the network allocations in use (`network`, `network-forward`… #

Documentation

Specifications

Other Resources

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/canonical-network-allocations-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

canonical-network-allocations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: lxd@lists.canonical.com
    name: LXD upstream
    url: https://github.com/canonical/lxd
  description: 'This is the REST API used by all LXD clients.

    Internal endpoints aren''t included in this documentation.


    The LXD 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.'
  license:
    name: AGPL-3.0-only
    url: https://www.gnu.org/licenses/agpl-3.0.en.html
  title: LXD external REST Network Allocations API
  version: '1.0'
tags:
- name: network-allocations
paths:
  /1.0/network-allocations:
    get:
      description: Returns a list of network allocations in use by a LXD deployment.
      operationId: network_allocations_get
      parameters:
      - description: Project name
        example: default
        in: query
        name: project
        schema:
          type: string
      - description: Retrieve entities from all projects
        in: query
        name: all-projects
        schema:
          type: boolean
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                properties:
                  metadata:
                    description: List of network allocations used by a consuming entity
                    items:
                      $ref: '#/components/schemas/NetworkAllocations'
                    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 network allocations in use (`network`, `network-forward`…
      tags:
      - network-allocations
components:
  responses:
    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
    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
  schemas:
    NetworkAllocations:
      description: 'NetworkAllocations used for displaying network addresses used by a consuming entity

        e.g, instance, network forward, load-balancer, network...'
      properties:
        addresses:
          description: The network address of the allocation (in CIDR format)
          example: 192.0.2.1/24
          type: string
          x-go-name: Address
        hwaddr:
          description: Hwaddr is the MAC address of the entity consuming the network address
          type: string
          x-go-name: Hwaddr
        nat:
          description: Whether the entity comes from a network that LXD performs egress source NAT on
          type: boolean
          x-go-name: NAT
        network:
          description: Network is the name of the network the allocated address belongs to
          type: string
          x-go-name: Network
        type:
          description: Type of the entity consuming the network address
          type: string
          x-go-name: Type
        used_by:
          description: Name of the entity consuming the network address
          type: string
          x-go-name: UsedBy
      type: object
      x-go-package: github.com/canonical/lxd/shared/api