openapi: 3.1.0 info: title: Juniper Networks Juniper Apstra Intent-Based Networking Alarms Virtual Networks API description: RESTful API for Juniper Apstra, an intent-based networking platform for automating data center network design, deployment, and operations. Apstra abstracts network infrastructure into design blueprints with logical models, rack types, templates, and connectivity. The platform continuously validates that the network state matches the intended configuration and raises anomalies when deviations occur. The API provides full access to design resources, blueprints, device management, telemetry, and IBA (Intent-Based Analytics) probes. Authentication uses token-based sessions obtained via the login endpoint. version: '4.2' contact: name: Juniper Networks Support url: https://www.juniper.net/documentation/product/us/en/juniper-apstra/ license: name: Proprietary url: https://www.juniper.net/us/en/legal-notices.html servers: - url: https://{apstra_server}/api description: Apstra server API endpoint. variables: apstra_server: description: Hostname or IP address of the Apstra server. default: apstra.example.com security: - authToken: [] tags: - name: Virtual Networks description: Virtual network creation and management. paths: /virtual-networks: get: operationId: listVirtualNetworks summary: Juniper Networks List virtual networks description: Returns all virtual networks accessible to the authenticated user. Virtual networks are the core abstraction in Contrail, representing isolated Layer 2/3 network segments with VXLAN/MPLS encapsulation. tags: - Virtual Networks parameters: - name: parent_id in: query description: Filter by parent project UUID. schema: type: string format: uuid - name: detail in: query description: When true, returns full object details instead of references. schema: type: boolean responses: '200': description: Virtual networks returned. content: application/json: schema: type: object properties: virtual-networks: type: array items: $ref: '#/components/schemas/VirtualNetworkRef' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createVirtualNetwork summary: Juniper Networks Create virtual network description: Creates a new virtual network. The network is automatically assigned a VXLAN VNI and route targets for BGP EVPN control plane operation. tags: - Virtual Networks requestBody: required: true content: application/json: schema: type: object properties: virtual-network: $ref: '#/components/schemas/VirtualNetwork' responses: '200': description: Virtual network created. content: application/json: schema: type: object properties: virtual-network: $ref: '#/components/schemas/VirtualNetwork' '400': $ref: '#/components/responses/BadRequest' /virtual-network/{vn_id}: get: operationId: getVirtualNetwork summary: Juniper Networks Get virtual network description: Returns details for a specific virtual network. tags: - Virtual Networks parameters: - $ref: '#/components/parameters/VnId' responses: '200': description: Virtual network returned. content: application/json: schema: type: object properties: virtual-network: $ref: '#/components/schemas/VirtualNetwork' '404': $ref: '#/components/responses/NotFound' put: operationId: updateVirtualNetwork summary: Juniper Networks Update virtual network description: Updates properties of a virtual network. tags: - Virtual Networks parameters: - $ref: '#/components/parameters/VnId' requestBody: required: true content: application/json: schema: type: object properties: virtual-network: $ref: '#/components/schemas/VirtualNetwork' responses: '200': description: Virtual network updated. '400': $ref: '#/components/responses/BadRequest' delete: operationId: deleteVirtualNetwork summary: Juniper Networks Delete virtual network description: Deletes a virtual network and releases associated resources. tags: - Virtual Networks parameters: - $ref: '#/components/parameters/VnId' responses: '200': description: Virtual network deleted. '409': description: Virtual network has active references and cannot be deleted. components: responses: NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request parameters. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Authentication required or token expired. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object properties: message: type: string VirtualNetworkRef: type: object properties: href: type: string format: uri fq_name: type: array items: type: string uuid: type: string format: uuid VirtualNetwork: type: object properties: uuid: type: string format: uuid description: Virtual network UUID. fq_name: type: array items: type: string description: Fully qualified name. display_name: type: string description: Display name. parent_type: type: string description: Parent object type (project). virtual_network_properties: type: object properties: vxlan_network_identifier: type: integer description: VXLAN VNI. forwarding_mode: type: string enum: - l2_l3 - l2 - l3 description: Forwarding mode. rpf: type: string enum: - enable - disable description: Reverse path forwarding setting. network_ipam_refs: type: array description: IP address management references with subnet configuration. 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 dns_server_address: type: string route_target_list: type: object properties: route_target: type: array items: type: string description: BGP route targets for import/export. is_shared: type: boolean description: Whether the network is shared across projects. router_external: type: boolean description: Whether the network provides external connectivity. parameters: VnId: name: vn_id in: path required: true description: Virtual network UUID. schema: type: string format: uuid securitySchemes: authToken: type: apiKey in: header name: AuthToken description: Authentication token obtained from POST /api/aaa/login. Include in the AuthToken header for all authenticated API requests.