Juniper Networks NAT API

Network address translation rule management.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

juniper-networks-nat-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Juniper Networks Juniper Apstra Intent-Based Networking Alarms NAT 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: NAT
  description: Network address translation rule management.
paths:
  /v1/security/nat/source:
    get:
      operationId: listSourceNatRules
      summary: Juniper Networks List source NAT rules
      description: Returns all source NAT rule sets and rules. Source NAT translates the source IP address of outbound traffic for internet access or address hiding.
      tags:
      - NAT
      responses:
        '200':
          description: Source NAT rules returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  source-nat-rules:
                    type: array
                    items:
                      $ref: '#/components/schemas/NatRuleSet'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/security/nat/destination:
    get:
      operationId: listDestinationNatRules
      summary: Juniper Networks List destination NAT rules
      description: Returns all destination NAT rule sets and rules. Destination NAT translates destination addresses for inbound traffic to internal server addresses.
      tags:
      - NAT
      responses:
        '200':
          description: Destination NAT rules returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  destination-nat-rules:
                    type: array
                    items:
                      $ref: '#/components/schemas/NatRuleSet'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message.
    NatRuleSet:
      type: object
      properties:
        name:
          type: string
          description: NAT rule set name.
        from:
          type: object
          properties:
            zone:
              type: string
            interface:
              type: string
        to:
          type: object
          properties:
            zone:
              type: string
            interface:
              type: string
        rules:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              match:
                type: object
                properties:
                  source_address:
                    type: array
                    items:
                      type: string
                  destination_address:
                    type: array
                    items:
                      type: string
                  destination_port:
                    type: integer
              then:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - pool
                    - interface
                    - false
                  pool_name:
                    type: string
  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.