openapi: 3.0.3
info:
  title: Networking API
  version: "2.0"
  description: >
    The OpenStack Networking API v2.0 provides network connectivity as a service
    between interface devices

    managed by other OpenStack services. This RESTful HTTP service uses all
    aspects of the HTTP protocol

    including methods, URIs, media types, response codes, and more.


    Based on the official OpenStack documentation at:
    https://docs.openstack.org/api-ref/network/v2/
  contact:
    name: OpenStack Community
    url: https://www.openstack.org/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-gitbook-description-document:
    object: document
    data:
      schemaVersion: 8
    nodes:
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  The OpenStack Networking API v2.0 provides network
                  connectivity as a service between interface devices managed by
                  other OpenStack services. This RESTful HTTP service uses all
                  aspects of the HTTP protocol including methods, URIs, media
                  types, response codes, and more.
                marks: []
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  Based on the official OpenStack documentation at:
                  https://docs.openstack.org/api-ref/network/v2/
                marks: []
  x-gitbook-description-html: >-
    <p>The OpenStack Networking API v2.0 provides network connectivity as a
    service between interface devices managed by other OpenStack services. This
    RESTful HTTP service uses all aspects of the HTTP protocol including
    methods, URIs, media types, response codes, and more.</p><p>Based on the
    official OpenStack documentation at:
    https://docs.openstack.org/api-ref/network/v2/</p>
servers:
  - url: https://{host}/neutron
    description: PCD Network API v2.0
    variables:
      host:
        default: example.platform9.com
        description: The PCD controlplane hostname
        x-gitbook-description-html: <p>The PCD controlplane hostname</p>
    x-gitbook-description-html: <p>PCD Network API v2.0</p>
paths:
  /v2.0/extensions:
    get:
      tags:
        - Extensions
      parameters:
        - $ref: "#/components/parameters/Fields"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionsResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: listExtensions
      summary: List extensions
      description: Lists available Networking API v2.0 extensions.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Lists available Networking API v2.0 extensions.
                    marks: []
      x-gitbook-description-html: <p>Lists available Networking API v2.0 extensions.</p>
  /v2.0/extensions/{alias}:
    get:
      tags:
        - Extensions
      parameters:
        - name: alias
          description: The alias of an extension.
          schema:
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The alias of an extension.</p>
        - $ref: "#/components/parameters/Fields"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: showExtension
      summary: Show extension details
      description: Shows details for an extension, by alias.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows details for an extension, by alias.
                    marks: []
      x-gitbook-description-html: <p>Shows details for an extension, by alias.</p>
  /v2.0/networks:
    get:
      tags:
        - Networks
      parameters:
        - $ref: "#/components/parameters/AdminStateUp"
        - $ref: "#/components/parameters/IdFilter"
        - $ref: "#/components/parameters/NameFilter"
        - $ref: "#/components/parameters/ProjectIdFilter"
        - $ref: "#/components/parameters/TenantIdFilter"
        - $ref: "#/components/parameters/SharedFilter"
        - $ref: "#/components/parameters/StatusFilter"
        - $ref: "#/components/parameters/RouterExternalFilter"
        - $ref: "#/components/parameters/Fields"
        - $ref: "#/components/parameters/SortDir"
        - $ref: "#/components/parameters/SortKey"
        - $ref: "#/components/parameters/Tags"
        - $ref: "#/components/parameters/TagsAny"
        - $ref: "#/components/parameters/NotTags"
        - $ref: "#/components/parameters/NotTagsAny"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworksResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: listNetworks
      summary: List networks
      description: Lists networks to which the project has access.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Lists networks to which the project has access.
                    marks: []
      x-gitbook-description-html: <p>Lists networks to which the project has access.</p>
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NetworkCreateRequest"
        required: true
      tags:
        - Networks
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkResponse"
          description: Network created successfully
          x-gitbook-description-html: <p>Network created successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: createNetwork
      summary: Create network
      description: Creates a network.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a network.
                    marks: []
      x-gitbook-description-html: <p>Creates a network.</p>
  /v2.0/networks/{network_id}:
    get:
      tags:
        - Networks
      parameters:
        - $ref: "#/components/parameters/NetworkId"
        - $ref: "#/components/parameters/Fields"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: showNetwork
      summary: Show network details
      description: Shows details for a network.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows details for a network.
                    marks: []
      x-gitbook-description-html: <p>Shows details for a network.</p>
    put:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NetworkUpdateRequest"
        required: true
      tags:
        - Networks
      parameters:
        - $ref: "#/components/parameters/NetworkId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkResponse"
          description: Network updated successfully
          x-gitbook-description-html: <p>Network updated successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: updateNetwork
      summary: Update network
      description: Updates a network.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates a network.
                    marks: []
      x-gitbook-description-html: <p>Updates a network.</p>
    delete:
      tags:
        - Networks
      parameters:
        - $ref: "#/components/parameters/NetworkId"
      responses:
        "204":
          description: Network deleted successfully
          x-gitbook-description-html: <p>Network deleted successfully</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: deleteNetwork
      summary: Delete network
      description: Deletes a network and its associated resources.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a network and its associated resources.
                    marks: []
      x-gitbook-description-html: <p>Deletes a network and its associated resources.</p>
  /v2.0/ports:
    get:
      tags:
        - Ports
      parameters:
        - $ref: "#/components/parameters/AdminStateUp"
        - $ref: "#/components/parameters/IdFilter"
        - $ref: "#/components/parameters/NameFilter"
        - $ref: "#/components/parameters/NetworkIdFilter"
        - $ref: "#/components/parameters/ProjectIdFilter"
        - $ref: "#/components/parameters/TenantIdFilter"
        - $ref: "#/components/parameters/DeviceIdFilter"
        - $ref: "#/components/parameters/DeviceOwnerFilter"
        - $ref: "#/components/parameters/StatusFilter"
        - $ref: "#/components/parameters/Fields"
        - $ref: "#/components/parameters/SortDir"
        - $ref: "#/components/parameters/SortKey"
        - $ref: "#/components/parameters/Tags"
        - $ref: "#/components/parameters/TagsAny"
        - $ref: "#/components/parameters/NotTags"
        - $ref: "#/components/parameters/NotTagsAny"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PortsResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: listPorts
      summary: List ports
      description: Lists ports to which the project has access.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Lists ports to which the project has access.
                    marks: []
      x-gitbook-description-html: <p>Lists ports to which the project has access.</p>
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PortCreateRequest"
        required: true
      tags:
        - Ports
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PortResponse"
          description: Port created successfully
          x-gitbook-description-html: <p>Port created successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: createPort
      summary: Create port
      description: Creates a port.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a port.
                    marks: []
      x-gitbook-description-html: <p>Creates a port.</p>
  /v2.0/ports/{port_id}:
    get:
      tags:
        - Ports
      parameters:
        - $ref: "#/components/parameters/PortId"
        - $ref: "#/components/parameters/Fields"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PortResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: showPort
      summary: Show port details
      description: Shows details for a port.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows details for a port.
                    marks: []
      x-gitbook-description-html: <p>Shows details for a port.</p>
    put:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PortUpdateRequest"
        required: true
      tags:
        - Ports
      parameters:
        - $ref: "#/components/parameters/PortId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PortResponse"
          description: Port updated successfully
          x-gitbook-description-html: <p>Port updated successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: updatePort
      summary: Update port
      description: Updates a port.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates a port.
                    marks: []
      x-gitbook-description-html: <p>Updates a port.</p>
    delete:
      tags:
        - Ports
      parameters:
        - $ref: "#/components/parameters/PortId"
      responses:
        "204":
          description: Port deleted successfully
          x-gitbook-description-html: <p>Port deleted successfully</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: deletePort
      summary: Delete port
      description: Deletes a port.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a port.
                    marks: []
      x-gitbook-description-html: <p>Deletes a port.</p>
  /v2.0/subnets:
    get:
      tags:
        - Subnets
      parameters:
        - $ref: "#/components/parameters/NetworkIdFilter"
        - $ref: "#/components/parameters/IdFilter"
        - $ref: "#/components/parameters/NameFilter"
        - $ref: "#/components/parameters/ProjectIdFilter"
        - $ref: "#/components/parameters/TenantIdFilter"
        - $ref: "#/components/parameters/Fields"
        - $ref: "#/components/parameters/SortDir"
        - $ref: "#/components/parameters/SortKey"
        - $ref: "#/components/parameters/Tags"
        - $ref: "#/components/parameters/TagsAny"
        - $ref: "#/components/parameters/NotTags"
        - $ref: "#/components/parameters/NotTagsAny"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubnetsResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: listSubnets
      summary: List subnets
      description: Lists subnets to which the project has access.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Lists subnets to which the project has access.
                    marks: []
      x-gitbook-description-html: <p>Lists subnets to which the project has access.</p>
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SubnetCreateRequest"
        required: true
      tags:
        - Subnets
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubnetResponse"
          description: Subnet created successfully
          x-gitbook-description-html: <p>Subnet created successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
      operationId: createSubnet
      summary: Create subnet
      description: Creates a subnet.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a subnet.
                    marks: []
      x-gitbook-description-html: <p>Creates a subnet.</p>
  /v2.0/subnets/{subnet_id}:
    get:
      tags:
        - Subnets
      parameters:
        - $ref: "#/components/parameters/SubnetId"
        - $ref: "#/components/parameters/Fields"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubnetResponse"
          description: Successful operation
          x-gitbook-description-html: <p>Successful operation</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: showSubnet
      summary: Show subnet details
      description: Shows details for a subnet.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows details for a subnet.
                    marks: []
      x-gitbook-description-html: <p>Shows details for a subnet.</p>
    put:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SubnetUpdateRequest"
        required: true
      tags:
        - Subnets
      parameters:
        - $ref: "#/components/parameters/SubnetId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubnetResponse"
          description: Subnet updated successfully
          x-gitbook-description-html: <p>Subnet updated successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: updateSubnet
      summary: Update subnet
      description: Updates a subnet.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates a subnet.
                    marks: []
      x-gitbook-description-html: <p>Updates a subnet.</p>
    delete:
      tags:
        - Subnets
      parameters:
        - $ref: "#/components/parameters/SubnetId"
      responses:
        "204":
          description: Subnet deleted successfully
          x-gitbook-description-html: <p>Subnet deleted successfully</p>
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
      operationId: deleteSubnet
      summary: Delete subnet
      description: Deletes a subnet.
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a subnet.
                    marks: []
      x-gitbook-description-html: <p>Deletes a subnet.</p>
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            detail:
              type: string
    VersionsResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: "#/components/schemas/Version"
    Version:
      type: object
      properties:
        status:
          enum:
            - CURRENT
            - SUPPORTED
            - DEPRECATED
          type: string
        id:
          type: string
        links:
          type: array
          items:
            $ref: "#/components/schemas/Link"
    Link:
      type: object
      properties:
        href:
          format: uri
          type: string
        rel:
          type: string
    ResourcesResponse:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: "#/components/schemas/Resource"
    Resource:
      type: object
      properties:
        name:
          type: string
        collection:
          type: string
        links:
          type: array
          items:
            $ref: "#/components/schemas/Link"
    ExtensionsResponse:
      type: object
      properties:
        extensions:
          type: array
          items:
            $ref: "#/components/schemas/Extension"
    ExtensionResponse:
      type: object
      properties:
        extension:
          $ref: "#/components/schemas/Extension"
    Extension:
      type: object
      properties:
        name:
          type: string
        alias:
          type: string
        description:
          type: string
        updated:
          format: date-time
          type: string
        links:
          type: array
          items:
            $ref: "#/components/schemas/Link"
    NetworksResponse:
      type: object
      properties:
        networks:
          type: array
          items:
            $ref: "#/components/schemas/Network"
    NetworkResponse:
      type: object
      properties:
        network:
          $ref: "#/components/schemas/Network"
    Network:
      type: object
      properties:
        id:
          format: uuid
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        admin_state_up:
          type: boolean
        status:
          enum:
            - ACTIVE
            - BUILD
            - DOWN
            - ERROR
          type: string
          readOnly: true
        shared:
          type: boolean
        project_id:
          format: uuid
          type: string
        tenant_id:
          format: uuid
          type: string
        subnets:
          type: array
          items:
            format: uuid
            type: string
          readOnly: true
        router:external:
          type: boolean
        provider:network_type:
          enum:
            - flat
            - vlan
            - vxlan
            - gre
            - local
          type: string
        provider:physical_network:
          type: string
        provider:segmentation_id:
          type: integer
        mtu:
          minimum: 68
          type: integer
        port_security_enabled:
          type: boolean
        dns_domain:
          type: string
        qos_policy_id:
          format: uuid
          type: string
        availability_zone_hints:
          type: array
          items:
            type: string
        availability_zones:
          type: array
          items:
            type: string
          readOnly: true
        ipv4_address_scope:
          format: uuid
          type: string
        ipv6_address_scope:
          format: uuid
          type: string
        l2_adjacency:
          type: boolean
          readOnly: true
        vlan_transparent:
          type: boolean
        qinq:
          type: boolean
        is_default:
          type: boolean
        segments:
          type: array
          items:
            $ref: "#/components/schemas/NetworkSegment"
        tags:
          type: array
          items:
            type: string
        revision_number:
          type: integer
          readOnly: true
        created_at:
          format: date-time
          type: string
          readOnly: true
        updated_at:
          format: date-time
          type: string
          readOnly: true
    NetworkSegment:
      type: object
      properties:
        provider:network_type:
          type: string
        provider:physical_network:
          type: string
        provider:segmentation_id:
          type: integer
    NetworkCreateRequest:
      type: object
      properties:
        network:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            admin_state_up:
              default: true
              type: boolean
            shared:
              default: false
              type: boolean
            project_id:
              format: uuid
              type: string
            tenant_id:
              format: uuid
              type: string
            provider:network_type:
              type: string
            provider:physical_network:
              type: string
            provider:segmentation_id:
              type: integer
            mtu:
              type: integer
            port_security_enabled:
              type: boolean
            dns_domain:
              type: string
            qos_policy_id:
              format: uuid
              type: string
            router:external:
              type: boolean
            vlan_transparent:
              type: boolean
            is_default:
              type: boolean
            availability_zone_hints:
              type: array
              items:
                type: string
            segments:
              type: array
              items:
                $ref: "#/components/schemas/NetworkSegment"
    NetworkUpdateRequest:
      type: object
      properties:
        network:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            admin_state_up:
              type: boolean
            shared:
              type: boolean
            provider:network_type:
              type: string
            provider:physical_network:
              type: string
            provider:segmentation_id:
              type: integer
            mtu:
              type: integer
            port_security_enabled:
              type: boolean
            dns_domain:
              type: string
            qos_policy_id:
              format: uuid
              type: string
            router:external:
              type: boolean
            segments:
              type: array
              items:
                $ref: "#/components/schemas/NetworkSegment"
    PortsResponse:
      type: object
      properties:
        ports:
          type: array
          items:
            $ref: "#/components/schemas/Port"
    PortResponse:
      type: object
      properties:
        port:
          $ref: "#/components/schemas/Port"
    Port:
      type: object
      properties:
        id:
          format: uuid
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        network_id:
          format: uuid
          type: string
        admin_state_up:
          type: boolean
        status:
          enum:
            - ACTIVE
            - BUILD
            - DOWN
            - ERROR
          type: string
          readOnly: true
        mac_address:
          pattern: ^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
          type: string
        fixed_ips:
          type: array
          items:
            $ref: "#/components/schemas/FixedIP"
        project_id:
          format: uuid
          type: string
        tenant_id:
          format: uuid
          type: string
        device_id:
          type: string
        device_owner:
          type: string
        security_groups:
          type: array
          items:
            format: uuid
            type: string
        allowed_address_pairs:
          type: array
          items:
            $ref: "#/components/schemas/AllowedAddressPair"
        extra_dhcp_opts:
          type: array
          items:
            $ref: "#/components/schemas/ExtraDhcpOpt"
        port_security_enabled:
          type: boolean
        dns_name:
          type: string
        dns_assignment:
          type: array
          items:
            $ref: "#/components/schemas/DnsAssignment"
          readOnly: true
        dns_domain:
          type: string
        data_plane_status:
          enum:
            - null
            - ACTIVE
            - DOWN
          type: string
        qos_policy_id:
          format: uuid
          type: string
        tags:
          type: array
          items:
            type: string
        revision_number:
          type: integer
          readOnly: true
        created_at:
          format: date-time
          type: string
          readOnly: true
        updated_at:
          format: date-time
          type: string
          readOnly: true
    FixedIP:
      type: object
      properties:
        subnet_id:
          format: uuid
          type: string
        ip_address:
          format: ipv4
          type: string
    AllowedAddressPair:
      type: object
      properties:
        ip_address:
          type: string
        mac_address:
          pattern: ^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
          type: string
    ExtraDhcpOpt:
      type: object
      properties:
        opt_name:
          type: string
        opt_value:
          type: string
        ip_version:
          enum:
            - 4
            - 6
          type: integer
    DnsAssignment:
      type: object
      properties:
        hostname:
          type: string
        ip_address:
          type: string
        fqdn:
          type: string
    PortCreateRequest:
      required:
        - port
      type: object
      properties:
        port:
          required:
            - network_id
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            network_id:
              format: uuid
              type: string
            admin_state_up:
              default: true
              type: boolean
            mac_address:
              type: string
            fixed_ips:
              type: array
              items:
                $ref: "#/components/schemas/FixedIP"
            project_id:
              format: uuid
              type: string
            tenant_id:
              format: uuid
              type: string
            device_id:
              type: string
            device_owner:
              type: string
            security_groups:
              type: array
              items:
                format: uuid
                type: string
            allowed_address_pairs:
              type: array
              items:
                $ref: "#/components/schemas/AllowedAddressPair"
            extra_dhcp_opts:
              type: array
              items:
                $ref: "#/components/schemas/ExtraDhcpOpt"
            port_security_enabled:
              type: boolean
            dns_name:
              type: string
            dns_domain:
              type: string
            qos_policy_id:
              format: uuid
              type: string
    PortUpdateRequest:
      type: object
      properties:
        port:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            admin_state_up:
              type: boolean
            fixed_ips:
              type: array
              items:
                $ref: "#/components/schemas/FixedIP"
            device_id:
              type: string
            device_owner:
              type: string
            security_groups:
              type: array
              items:
                format: uuid
                type: string
            allowed_address_pairs:
              type: array
              items:
                $ref: "#/components/schemas/AllowedAddressPair"
            extra_dhcp_opts:
              type: array
              items:
                $ref: "#/components/schemas/ExtraDhcpOpt"
            port_security_enabled:
              type: boolean
            dns_name:
              type: string
            dns_domain:
              type: string
            data_plane_status:
              enum:
                - null
                - ACTIVE
                - DOWN
              type: string
            qos_policy_id:
              format: uuid
              type: string
    SubnetsResponse:
      type: object
      properties:
        subnets:
          type: array
          items:
            $ref: "#/components/schemas/Subnet"
    SubnetResponse:
      type: object
      properties:
        subnet:
          $ref: "#/components/schemas/Subnet"
    Subnet:
      type: object
      properties:
        id:
          format: uuid
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        network_id:
          format: uuid
          type: string
        ip_version:
          enum:
            - 4
            - 6
          type: integer
        cidr:
          type: string
        gateway_ip:
          type: string
        dhcp_enabled:
          type: boolean
        dns_nameservers:
          type: array
          items:
            type: string
        allocation_pools:
          type: array
          items:
            $ref: "#/components/schemas/AllocationPool"
        host_routes:
          type: array
          items:
            $ref: "#/components/schemas/HostRoute"
        project_id:
          format: uuid
          type: string
        tenant_id:
          format: uuid
          type: string
        ipv6_address_mode:
          enum:
            - slaac
            - dhcpv6-stateful
            - dhcpv6-stateless
          type: string
        ipv6_ra_mode:
          enum:
            - slaac
            - dhcpv6-stateful
            - dhcpv6-stateless
          type: string
        subnetpool_id:
          format: uuid
          type: string
        tags:
          type: array
          items:
            type: string
        revision_number:
          type: integer
          readOnly: true
        created_at:
          format: date-time
          type: string
          readOnly: true
        updated_at:
          format: date-time
          type: string
          readOnly: true
    AllocationPool:
      type: object
      properties:
        start:
          type: string
        end:
          type: string
    HostRoute:
      type: object
      properties:
        destination:
          type: string
        nexthop:
          type: string
    SubnetCreateRequest:
      required:
        - subnet
      type: object
      properties:
        subnet:
          required:
            - network_id
            - cidr
            - ip_version
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            network_id:
              format: uuid
              type: string
            ip_version:
              enum:
                - 4
                - 6
              type: integer
            cidr:
              type: string
            gateway_ip:
              type: string
            dhcp_enabled:
              default: true
              type: boolean
            dns_nameservers:
              type: array
              items:
                type: string
            allocation_pools:
              type: array
              items:
                $ref: "#/components/schemas/AllocationPool"
            host_routes:
              type: array
              items:
                $ref: "#/components/schemas/HostRoute"
            project_id:
              format: uuid
              type: string
            tenant_id:
              format: uuid
              type: string
            ipv6_address_mode:
              enum:
                - slaac
                - dhcpv6-stateful
                - dhcpv6-stateless
              type: string
            ipv6_ra_mode:
              enum:
                - slaac
                - dhcpv6-stateful
                - dhcpv6-stateless
              type: string
            subnetpool_id:
              format: uuid
              type: string
    SubnetUpdateRequest:
      type: object
      properties:
        subnet:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            gateway_ip:
              type: string
            dhcp_enabled:
              type: boolean
            dns_nameservers:
              type: array
              items:
                type: string
            allocation_pools:
              type: array
              items:
                $ref: "#/components/schemas/AllocationPool"
            host_routes:
              type: array
              items:
                $ref: "#/components/schemas/HostRoute"
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Unauthorized
      x-gitbook-description-html: <p>Unauthorized</p>
    Forbidden:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Forbidden
      x-gitbook-description-html: <p>Forbidden</p>
    NotFound:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Not Found
      x-gitbook-description-html: <p>Not Found</p>
    BadRequest:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Bad Request
      x-gitbook-description-html: <p>Bad Request</p>
    Conflict:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Conflict
      x-gitbook-description-html: <p>Conflict</p>
    PreconditionFailed:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Precondition Failed
      x-gitbook-description-html: <p>Precondition Failed</p>
  parameters:
    NetworkId:
      name: network_id
      description: The ID of the network.
      schema:
        format: uuid
        type: string
      in: path
      required: true
      x-gitbook-description-html: <p>The ID of the network.</p>
    PortId:
      name: port_id
      description: The ID of the port.
      schema:
        format: uuid
        type: string
      in: path
      required: true
      x-gitbook-description-html: <p>The ID of the port.</p>
    SubnetId:
      name: subnet_id
      description: The ID of the subnet.
      schema:
        format: uuid
        type: string
      in: path
      required: true
      x-gitbook-description-html: <p>The ID of the subnet.</p>
    Fields:
      name: fields
      description: >-
        The fields that you want the server to return. If no fields are
        specified, all fields are returned.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>The fields that you want the server to return. If no fields are
        specified, all fields are returned.</p>
    AdminStateUp:
      name: admin_state_up
      description: Filter the list result by the administrative state of the resource.
      schema:
        type: boolean
      in: query
      x-gitbook-description-html: >-
        <p>Filter the list result by the administrative state of the
        resource.</p>
    IdFilter:
      name: id
      description: Filter the list result by the ID of the resource.
      schema:
        type: string
      in: query
      x-gitbook-description-html: <p>Filter the list result by the ID of the resource.</p>
    NameFilter:
      name: name
      description: Filter the list result by the human-readable name of the resource.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>Filter the list result by the human-readable name of the
        resource.</p>
    NetworkIdFilter:
      name: network_id
      description: Filter the list result by the network ID.
      schema:
        type: string
      in: query
      x-gitbook-description-html: <p>Filter the list result by the network ID.</p>
    ProjectIdFilter:
      name: project_id
      description: Filter the list result by the ID of the project that owns the resource.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>Filter the list result by the ID of the project that owns the
        resource.</p>
    TenantIdFilter:
      name: tenant_id
      description: Filter the list result by the ID of the project that owns the resource.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>Filter the list result by the ID of the project that owns the
        resource.</p>
    DeviceIdFilter:
      name: device_id
      description: Filter ports by device ID.
      schema:
        type: string
      in: query
      x-gitbook-description-html: <p>Filter ports by device ID.</p>
    DeviceOwnerFilter:
      name: device_owner
      description: Filter ports by device owner.
      schema:
        type: string
      in: query
      x-gitbook-description-html: <p>Filter ports by device owner.</p>
    SharedFilter:
      name: shared
      description: >-
        Filter the network list result based on if the network is shared across
        all tenants.
      schema:
        type: boolean
      in: query
      x-gitbook-description-html: >-
        <p>Filter the network list result based on if the network is shared
        across all tenants.</p>
    RouterExternalFilter:
      name: router:external
      description: >-
        Filter the network list result based on whether the network has an
        external routing facility.
      schema:
        type: boolean
      in: query
      x-gitbook-description-html: >-
        <p>Filter the network list result based on whether the network has an
        external routing facility.</p>
    StatusFilter:
      name: status
      description: Filter the list result by status.
      schema:
        enum:
          - ACTIVE
          - BUILD
          - DOWN
          - ERROR
        type: string
      in: query
      x-gitbook-description-html: <p>Filter the list result by status.</p>
    SortDir:
      name: sort_dir
      description: Sort direction. A valid value is asc (ascending) or desc (descending).
      schema:
        enum:
          - asc
          - desc
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>Sort direction. A valid value is asc (ascending) or desc
        (descending).</p>
    SortKey:
      name: sort_key
      description: Sorts by a resource attribute.
      schema:
        type: string
      in: query
      x-gitbook-description-html: <p>Sorts by a resource attribute.</p>
    Tags:
      name: tags
      description: >-
        A list of tags to filter the list result by. Resources that match all
        tags in this list will be returned.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>A list of tags to filter the list result by. Resources that match all
        tags in this list will be returned.</p>
    TagsAny:
      name: tags-any
      description: >-
        A list of tags to filter the list result by. Resources that match any
        tag in this list will be returned.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>A list of tags to filter the list result by. Resources that match any
        tag in this list will be returned.</p>
    NotTags:
      name: not-tags
      description: >-
        A list of tags to filter the list result by. Resources that match all
        tags in this list will be excluded.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>A list of tags to filter the list result by. Resources that match all
        tags in this list will be excluded.</p>
    NotTagsAny:
      name: not-tags-any
      description: >-
        A list of tags to filter the list result by. Resources that match any
        tag in this list will be excluded.
      schema:
        type: string
      in: query
      x-gitbook-description-html: >-
        <p>A list of tags to filter the list result by. Resources that match any
        tag in this list will be excluded.</p>
  securitySchemes:
    pcdAuth:
      name: X-Auth-Token
      type: apiKey
      in: header
      description: PCD Identity Service token authentication
      x-gitbook-description-html: <p>PCD Identity Service token authentication</p>
security:
  - pcdAuth: []
tags:
  - name: Versions
    description: API version discovery and information
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: API version discovery and information
                  marks: []
    x-gitbook-description-html: <p>API version discovery and information</p>
  - name: Extensions
    description: API extension discovery and details
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: API extension discovery and details
                  marks: []
    x-gitbook-description-html: <p>API extension discovery and details</p>
  - name: Networks
    description: Virtual network management operations
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Virtual network management operations
                  marks: []
    x-gitbook-description-html: <p>Virtual network management operations</p>
  - name: Ports
    description: Network port management operations
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Network port management operations
                  marks: []
    x-gitbook-description-html: <p>Network port management operations</p>
  - name: Subnets
    description: Network subnet management operations
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Network subnet management operations
                  marks: []
    x-gitbook-description-html: <p>Network subnet management operations</p>
