Juniper Networks Virtual Networks API

Virtual network and routing zone management

OpenAPI Specification

juniper-virtual-networks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Juniper Networks Juniper Apstra Allowlists and Blocklists Virtual Networks API
  description: Juniper Apstra is an intent-based networking platform for data center automation. The Apstra API provides RESTful access to manage blueprints, design elements, devices, connectivity templates, virtual networks, and intent-based analytics. It supports multivendor environments and enables closed-loop automation from design through deployment and operations.
  version: 4.2.0
  contact:
    name: Juniper Support
    url: https://www.juniper.net/us/en/products/network-automation/apstra.html
    email: support@juniper.net
  license:
    name: Proprietary
    url: https://www.juniper.net/us/en/legal-notices.html
  termsOfService: https://www.juniper.net/us/en/legal-notices.html
servers:
- url: https://{apstra_server}/api
  description: Apstra Server
  variables:
    apstra_server:
      default: apstra.example.com
      description: Hostname or IP of the Apstra server
security:
- authToken: []
tags:
- name: Virtual Networks
  description: Virtual network and routing zone management
paths:
  /blueprints/{blueprint_id}/security-zones:
    get:
      operationId: listSecurityZones
      summary: Juniper Networks List security zones (routing zones / VRFs)
      description: Returns routing zones (VRFs) in the blueprint.
      tags:
      - Virtual Networks
      parameters:
      - $ref: '#/components/parameters/BlueprintId'
      responses:
        '200':
          description: List of security zones
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/SecurityZone'
    post:
      operationId: createSecurityZone
      summary: Juniper Networks Create security zone
      description: Creates a new routing zone (VRF) in the blueprint.
      tags:
      - Virtual Networks
      parameters:
      - $ref: '#/components/parameters/BlueprintId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecurityZone'
      responses:
        '201':
          description: Security zone created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityZone'
  /blueprints/{blueprint_id}/virtual-networks:
    get:
      operationId: listVirtualNetworks
      summary: Juniper Networks List virtual networks
      description: Returns virtual networks configured in the blueprint.
      tags:
      - Virtual Networks
      parameters:
      - $ref: '#/components/parameters/BlueprintId'
      responses:
        '200':
          description: List of virtual networks
          content:
            application/json:
              schema:
                type: object
                properties:
                  virtual_networks:
                    type: array
                    items:
                      $ref: '#/components/schemas/VirtualNetwork'
    post:
      operationId: createVirtualNetwork
      summary: Juniper Networks Create virtual network
      description: Creates a new virtual network in the blueprint.
      tags:
      - Virtual Networks
      parameters:
      - $ref: '#/components/parameters/BlueprintId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualNetwork'
      responses:
        '201':
          description: Virtual network created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetwork'
  /virtual-networks:
    get:
      operationId: listVirtualNetworks
      summary: Juniper Networks List virtual networks
      description: Returns all virtual networks.
      tags:
      - Virtual Networks
      parameters:
      - $ref: '#/components/parameters/ParentId'
      - $ref: '#/components/parameters/DetailParam'
      responses:
        '200':
          description: List of virtual networks
          content:
            application/json:
              schema:
                type: object
                properties:
                  virtual-networks:
                    type: array
                    items:
                      $ref: '#/components/schemas/ResourceRef'
    post:
      operationId: createVirtualNetwork
      summary: Juniper Networks Create virtual network
      description: Creates a new virtual network.
      tags:
      - Virtual Networks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                virtual-network:
                  $ref: '#/components/schemas/VirtualNetwork_2'
      responses:
        '200':
          description: Virtual network created
          content:
            application/json:
              schema:
                type: object
                properties:
                  virtual-network:
                    $ref: '#/components/schemas/VirtualNetwork_2'
  /virtual-network/{vn_id}:
    get:
      operationId: getVirtualNetwork
      summary: Juniper Networks Get virtual network
      description: Returns details of a specific virtual network.
      tags:
      - Virtual Networks
      parameters:
      - name: vn_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Virtual network details
          content:
            application/json:
              schema:
                type: object
                properties:
                  virtual-network:
                    $ref: '#/components/schemas/VirtualNetwork_2'
    put:
      operationId: updateVirtualNetwork
      summary: Juniper Networks Update virtual network
      description: Updates an existing virtual network.
      tags:
      - Virtual Networks
      parameters:
      - name: vn_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                virtual-network:
                  $ref: '#/components/schemas/VirtualNetwork_2'
      responses:
        '200':
          description: Virtual network updated
    delete:
      operationId: deleteVirtualNetwork
      summary: Juniper Networks Delete virtual network
      description: Deletes a virtual network.
      tags:
      - Virtual Networks
      parameters:
      - name: vn_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Virtual network deleted
components:
  schemas:
    VirtualNetwork_2:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        fq_name:
          type: array
          items:
            type: string
        display_name:
          type: string
        parent_type:
          type: string
        id_perms:
          $ref: '#/components/schemas/IdPerms'
        network_ipam_refs:
          type: array
          items:
            type: object
            properties:
              to:
                type: array
                items:
                  type: string
              attr:
                type: object
                properties:
                  ipam_subnets:
                    type: array
                    items:
                      type: object
                      properties:
                        subnet:
                          type: object
                          properties:
                            ip_prefix:
                              type: string
                            ip_prefix_len:
                              type: integer
                        default_gateway:
                          type: string
                        subnet_uuid:
                          type: string
                          format: uuid
        network_policy_refs:
          type: array
          items:
            type: object
            properties:
              to:
                type: array
                items:
                  type: string
              attr:
                type: object
                properties:
                  sequence:
                    type: object
                    properties:
                      major:
                        type: integer
                      minor:
                        type: integer
        virtual_network_properties:
          type: object
          properties:
            forwarding_mode:
              type: string
              enum:
              - default
              - l2_l3
              - l2
              - l3
            vxlan_network_identifier:
              type: integer
            rpf:
              type: string
              enum:
              - enable
              - disable
    VirtualNetwork:
      type: object
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
        vn_type:
          type: string
          enum:
          - vxlan
          - vlan
        vn_id:
          type: string
        security_zone_id:
          type: string
          format: uuid
        ipv4_subnet:
          type: string
        ipv4_gateway:
          type: string
        ipv6_subnet:
          type: string
        vlan_id:
          type: integer
        bound_to:
          type: array
          items:
            type: object
            properties:
              system_id:
                type: string
              vlan_id:
                type: integer
              access_switches:
                type: array
                items:
                  type: object
    SecurityZone:
      type: object
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
        vrf_name:
          type: string
        vlan_id:
          type: integer
        routing_policy_id:
          type: string
          format: uuid
        sz_type:
          type: string
          enum:
          - evpn
          - vlan
        rt_policy:
          type: object
          properties:
            import_RTs:
              type: array
              items:
                type: string
            export_RTs:
              type: array
              items:
                type: string
    ResourceRef:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        fq_name:
          type: array
          items:
            type: string
        href:
          type: string
          format: uri
    IdPerms:
      type: object
      properties:
        enable:
          type: boolean
        uuid:
          type: object
          properties:
            uuid_mslong:
              type: integer
            uuid_lslong:
              type: integer
        created:
          type: string
          format: date-time
        last_modified:
          type: string
          format: date-time
        description:
          type: string
        user_visible:
          type: boolean
  parameters:
    DetailParam:
      name: detail
      in: query
      description: Return full object details instead of references
      schema:
        type: boolean
        default: false
    BlueprintId:
      name: blueprint_id
      in: path
      required: true
      description: Blueprint unique identifier
      schema:
        type: string
        format: uuid
    ParentId:
      name: parent_id
      in: query
      description: Filter by parent resource UUID
      schema:
        type: string
        format: uuid
  securitySchemes:
    authToken:
      type: apiKey
      in: header
      name: AuthToken
      description: Authentication token obtained from the /aaa/login endpoint. Include as AuthToken header in all requests.
externalDocs:
  description: Apstra API Documentation
  url: https://www.juniper.net/documentation/us/en/software/apstra/