Juniper Networks Operational API

Operational data retrieval

OpenAPI Specification

juniper-operational-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Juniper Networks Juniper Apstra Allowlists and Blocklists Operational 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: Operational
  description: Operational data retrieval
paths:
  /rpc/get-software-information:
    get:
      operationId: getSoftwareInformation
      summary: Juniper Networks Get software version information
      description: Returns the Junos software version and related information.
      tags:
      - Operational
      responses:
        '200':
          description: Software information
          content:
            application/json:
              schema:
                type: object
                properties:
                  software-information:
                    type: object
                    properties:
                      host-name:
                        type: string
                      product-model:
                        type: string
                      product-name:
                        type: string
                      junos-version:
                        type: string
                      package-information:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            comment:
                              type: string
            application/xml:
              schema:
                type: string
  /rpc/get-interface-information:
    get:
      operationId: getInterfaceInformation
      summary: Juniper Networks Get interface information
      description: Returns interface status and statistics. Equivalent to the Junos CLI command 'show interfaces'.
      tags:
      - Operational
      parameters:
      - name: interface-name
        in: query
        description: Specific interface name (e.g., ge-0/0/0)
        schema:
          type: string
      - name: terse
        in: query
        description: Show terse output
        schema:
          type: boolean
      responses:
        '200':
          description: Interface information
          content:
            application/json:
              schema:
                type: object
                properties:
                  interface-information:
                    type: object
                    properties:
                      physical-interface:
                        type: array
                        items:
                          $ref: '#/components/schemas/PhysicalInterface'
  /rpc/get-route-information:
    get:
      operationId: getRouteInformation
      summary: Juniper Networks Get routing table information
      description: Returns routing table entries. Equivalent to the Junos CLI command 'show route'.
      tags:
      - Operational
      parameters:
      - name: destination
        in: query
        description: Specific route destination prefix
        schema:
          type: string
      - name: table
        in: query
        description: Routing table name
        schema:
          type: string
      responses:
        '200':
          description: Route information
          content:
            application/json:
              schema:
                type: object
                properties:
                  route-information:
                    type: object
                    properties:
                      route-table:
                        type: array
                        items:
                          $ref: '#/components/schemas/RouteTable'
  /rpc/get-bgp-neighbor-information:
    get:
      operationId: getBgpNeighborInformation
      summary: Juniper Networks Get BGP neighbor information
      description: Returns BGP session and neighbor information. Equivalent to the Junos CLI command 'show bgp neighbor'.
      tags:
      - Operational
      responses:
        '200':
          description: BGP neighbor information
          content:
            application/json:
              schema:
                type: object
                properties:
                  bgp-information:
                    type: object
                    properties:
                      bgp-peer:
                        type: array
                        items:
                          $ref: '#/components/schemas/BgpPeer'
  /rpc/get-chassis-inventory:
    get:
      operationId: getChassisInventory
      summary: Juniper Networks Get chassis inventory
      description: Returns the hardware inventory of the device chassis. Equivalent to the Junos CLI command 'show chassis hardware'.
      tags:
      - Operational
      responses:
        '200':
          description: Chassis inventory
          content:
            application/json:
              schema:
                type: object
                properties:
                  chassis-inventory:
                    type: object
                    properties:
                      chassis:
                        type: object
                        properties:
                          name:
                            type: string
                          serial-number:
                            type: string
                          description:
                            type: string
                          chassis-module:
                            type: array
                            items:
                              $ref: '#/components/schemas/ChassisModule'
  /rpc/get-alarm-information:
    get:
      operationId: getAlarmInformation
      summary: Juniper Networks Get alarm information
      description: Returns current system and chassis alarms. Equivalent to the Junos CLI command 'show chassis alarms'.
      tags:
      - Operational
      responses:
        '200':
          description: Alarm information
          content:
            application/json:
              schema:
                type: object
                properties:
                  alarm-information:
                    type: object
                    properties:
                      alarm-summary:
                        type: object
                        properties:
                          active-alarm-count:
                            type: integer
                      alarm-detail:
                        type: array
                        items:
                          $ref: '#/components/schemas/Alarm'
  /rpc/get-system-uptime-information:
    get:
      operationId: getSystemUptimeInformation
      summary: Juniper Networks Get system uptime
      description: Returns system uptime and boot time information.
      tags:
      - Operational
      responses:
        '200':
          description: System uptime information
          content:
            application/json:
              schema:
                type: object
                properties:
                  system-uptime-information:
                    type: object
                    properties:
                      current-time:
                        type: object
                        properties:
                          date-time:
                            type: string
                      system-booted-time:
                        type: object
                        properties:
                          date-time:
                            type: string
                          time-length:
                            type: string
                      last-configured-time:
                        type: object
                        properties:
                          date-time:
                            type: string
                          user:
                            type: string
  /rpc/get-lldp-neighbors-information:
    get:
      operationId: getLldpNeighborsInformation
      summary: Juniper Networks Get LLDP neighbor information
      description: Returns LLDP neighbor discovery data.
      tags:
      - Operational
      responses:
        '200':
          description: LLDP neighbors
          content:
            application/json:
              schema:
                type: object
                properties:
                  lldp-neighbors-information:
                    type: object
                    properties:
                      lldp-neighbor-information:
                        type: array
                        items:
                          $ref: '#/components/schemas/LldpNeighbor'
components:
  schemas:
    PhysicalInterface:
      type: object
      properties:
        name:
          type: string
          description: Interface name (e.g., ge-0/0/0)
        admin-status:
          type: string
          enum:
          - up
          - down
        oper-status:
          type: string
          enum:
          - up
          - down
        description:
          type: string
        mtu:
          type: integer
        speed:
          type: string
        if-type:
          type: string
        link-level-type:
          type: string
        traffic-statistics:
          type: object
          properties:
            input-packets:
              type: integer
            output-packets:
              type: integer
            input-bytes:
              type: integer
            output-bytes:
              type: integer
        logical-interface:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              address-family:
                type: array
                items:
                  type: object
                  properties:
                    address-family-name:
                      type: string
                    interface-address:
                      type: array
                      items:
                        type: object
                        properties:
                          ifa-local:
                            type: string
                            description: IP address
    ChassisModule:
      type: object
      properties:
        name:
          type: string
        version:
          type: string
        part-number:
          type: string
        serial-number:
          type: string
        description:
          type: string
        model-number:
          type: string
        chassis-sub-module:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              serial-number:
                type: string
    LldpNeighbor:
      type: object
      properties:
        lldp-local-interface:
          type: string
        lldp-local-parent-interface-name:
          type: string
        lldp-remote-chassis-id:
          type: string
        lldp-remote-port-id:
          type: string
        lldp-remote-system-name:
          type: string
    Alarm:
      type: object
      properties:
        alarm-time:
          type: string
          format: date-time
        alarm-class:
          type: string
          enum:
          - Major
          - Minor
        alarm-description:
          type: string
        alarm-type:
          type: string
    RouteTable:
      type: object
      properties:
        table-name:
          type: string
        destination-count:
          type: integer
        total-route-count:
          type: integer
        active-route-count:
          type: integer
        rt:
          type: array
          items:
            type: object
            properties:
              rt-destination:
                type: string
              rt-entry:
                type: object
                properties:
                  active-tag:
                    type: string
                  protocol-name:
                    type: string
                  preference:
                    type: integer
                  nh:
                    type: array
                    items:
                      type: object
                      properties:
                        to:
                          type: string
                        via:
                          type: string
                        nh-type:
                          type: string
    BgpPeer:
      type: object
      properties:
        peer-address:
          type: string
        peer-as:
          type: integer
        local-address:
          type: string
        local-as:
          type: integer
        peer-state:
          type: string
          enum:
          - Established
          - Active
          - Connect
          - OpenSent
          - OpenConfirm
          - Idle
        peer-type:
          type: string
          enum:
          - Internal
          - External
        route-received:
          type: integer
        route-accepted:
          type: integer
        route-advertised:
          type: integer
        elapsed-time:
          type: string
  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/