- play_arrow Manage NETCONF Sessions
- play_arrow NETCONF Session Overview
- play_arrow Manage NETCONF Sessions
- Establish an SSH Connection for a NETCONF Session
- NETCONF Sessions over Transport Layer Security (TLS)
- NETCONF and Shell Sessions over Enhanced Outbound HTTPS
- NETCONF Sessions over Outbound HTTPS
- NETCONF Call Home Sessions
- NETCONF Sessions
- Sample NETCONF Session
- How Character Encoding Works on Juniper Networks Devices
- Configure RFC-Compliant NETCONF Sessions
- NETCONF Monitoring
- NETCONF Event Notifications
- play_arrow NETCONF Tracing Operations
- play_arrow NETCONF Protocol Operations and Attributes
- play_arrow NETCONF Request and Response Tags
- play_arrow Junos XML Protocol Elements Supported in NETCONF Sessions
- <abort/>
- <abort-acknowledgement/>
- <checksum-information>
- <close-configuration/>
- <commit-configuration>
- <commit-results>
- <commit-revision-information>
- <database-status>
- <database-status-information>
- <end-session/>
- <get-checksum-information>
- <get-configuration>
- <load-configuration>
- <load-configuration-results>
- <lock-configuration/>
- <open-configuration>
- <reason>
- <request-end-session/>
- <routing-engine>
- <unlock-configuration/>
- <xnm:error>
- <xnm:warning>
- play_arrow Junos XML Protocol Element Attributes Supported in NETCONF Sessions
-
- play_arrow Manage Configurations Using NETCONF
- play_arrow Change the Configuration Using NETCONF
- Edit the Configuration Using NETCONF
- Upload and Format Configuration Data in a NETCONF Session
- Set the Edit Configuration Mode in a NETCONF Session
- Handle Errors While Editing the Candidate Configuration in a NETCONF Session
- Replace the Candidate Configuration Using NETCONF
- Roll Back Uncommitted Changes in the Candidate Configuration Using NETCONF
- Delete the Configuration Using NETCONF
- Change Individual Configuration Elements Using NETCONF
- Merge Configuration Elements Using NETCONF
- Create Configuration Elements Using NETCONF
- Delete Configuration Elements Using NETCONF
- Replace Configuration Elements Using NETCONF
- Replace Patterns in Configuration Data Using the NETCONF or Junos XML Protocol
- play_arrow Commit the Configuration Using NETCONF
- play_arrow Ephemeral Configuration Database
- Understanding the Ephemeral Configuration Database
- Unsupported Configuration Statements in the Ephemeral Configuration Database
- Enable and Configure Instances of the Ephemeral Configuration Database
- Commit and Synchronize Ephemeral Configuration Data Using the NETCONF or Junos XML Protocol
- Managing Ephemeral Configuration Database Space
- Example: Configure the Ephemeral Configuration Database Using NETCONF
-
- play_arrow Request Operational and Configuration Information Using NETCONF
- play_arrow Request Operational Information Using NETCONF
- play_arrow Request Configuration Information Using NETCONF
- Request the Committed Configuration and Device State Using NETCONF
- Request Configuration Data Using NETCONF
- Specify the Source for Configuration Information Requests Using NETCONF
- Specify the Scope of Configuration Information to Return in a NETCONF Response
- Request the Complete Configuration Using NETCONF
- Request a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF
- Request All Configuration Objects of a Specified Type Using NETCONF
- Request Identifiers for Configuration Objects of a Specified Type Using NETCONF
- Request A Specific Configuration Object Using NETCONF
- Request Specific Child Tags for a Configuration Object Using NETCONF
- Request Multiple Configuration Elements Simultaneously Using NETCONF
- Retrieve a Previous (Rollback) Configuration Using NETCONF
- Compare Two Previous (Rollback) Configurations Using NETCONF
- Retrieve the Rescue Configuration Using NETCONF
- Request an XML Schema for the Configuration Hierarchy Using NETCONF
-
- play_arrow NETCONF Utilities
- play_arrow NETCONF Perl Client
- play_arrow Develop NETCONF Perl Client Applications
- Write NETCONF Perl Client Applications
- Import Perl Modules and Declare Constants in NETCONF Perl Client Applications
- Connect to the NETCONF Server in Perl Client Applications
- Collect Parameters Interactively in NETCONF Perl Client Applications
- Submit a Request to the NETCONF Server in Perl Client Applications
- Example: Request an Inventory of Hardware Components Using a NETCONF Perl Client Application
- Example: Change the Configuration Using a NETCONF Perl Client Application
- Parse the NETCONF Server Response in Perl Client Applications
- Close the Connection to the NETCONF Server in Perl Client Applications
-
- play_arrow YANG
- play_arrow YANG Overview
- Understanding YANG on Devices Running Junos OS
- Understanding Junos YANG Modules
- YANG Modules Overview
- Understanding the YANG Modules That Define the Junos OS Configuration
- Understanding the YANG Modules for Junos Operational Commands
- Junos Genstate YANG Data Models
- Understanding the Junos DDL Extensions YANG Module
- YANG Metadata Annotations for Junos Devices
- Use Juniper Networks YANG Modules
- play_arrow Create and Use Non-Native YANG Modules
- Understanding the Management of Nonnative YANG Modules on Devices Running Junos OS
- Manage YANG Packages, Modules, and Scripts on Junos Devices
- Managing YANG Packages and Configurations During a Software Upgrade or Downgrade
- Create Translation Scripts for YANG Configuration Models
- Disable and Enable YANG Translation Scripts on Devices Running Junos OS
- Commit and Display Configuration Data for Nonnative YANG Modules
- Create Custom RPCs in YANG for Devices Running Junos OS
- Create Action Scripts for YANG RPCs on Junos Devices
- Use Custom YANG RPCs on Devices Running Junos OS
- Example: Use a Custom YANG RPC to Retrieve Operational Information on Junos Devices
- Understanding Junos OS YANG Extensions for Formatting RPC Output
- Customize YANG RPC Output on Devices Running Junos OS
- Define Different Levels of Output in Custom YANG RPCs for Junos Devices
- Display Valid Command Option and Configuration Statement Values in the CLI for Custom YANG Modules
- Configure a NETCONF Proxy Telemetry Sensor in Junos
-
- play_arrow OpenDaylight Integration
- play_arrow Configure OpenDaylight Integration
-
- play_arrow Configuration Statements and Operational Commands
Map Junos OS Commands and Command Output to Junos XML Tag Elements
The Junos XML API is an XML representation of Junos OS configuration statements and operational mode commands. It defines an XML equivalent for all statements in the Junos OS configuration hierarchy and many of the commands that you issue in CLI operational mode. Each operational mode command with a Junos XML counterpart maps to a request tag element and, if necessary, a response tag element.
Request tag elements are used in remote procedure calls (RPCs)
within NETCONF and Junos XML protocol sessions to request information
from a device running Junos OS. The server returns the response using
Junos XML tag elements enclosed within the response tag element. For
example, the show interfaces
command maps to the <get-interface-information>
request tag, and the
server returns the <interface-information>
response tag.
The following sections outline how to map commands, command options, and command output to Junos XML tag elements.
Mapping Command Output to Junos XML Elements
On the Junos OS command-line interface (CLI), to display
command output as Junos XML tag elements instead of as the default
formatted ASCII text, include the | display xml
option after the command. The tag elements that describe the Junos
OS configuration or operational data belong to the Junos XML API,
which defines the Junos OS content that can be retrieved and manipulated
by NETCONF and Junos XML management protocol operations.
The following example shows the output from the show chassis hardware
command issued on an M20 router that is running Junos OS Release
9.3 (the opening <chassis-inventory>
tag appears on two lines only for legibility). This is identical
to the server’s response for the <get-chassis-inventory>
RPC request.
user@host> show chassis hardware | display xml <rpc-reply xmlns:junos="http://xml.juniper.net/junos/9.3R1/junos"> <chassis-inventory \ xmlns="http://xml.juniper.net/junos/9.3R1/junos-chassis"> <chassis junos:style="inventory"> <name>Chassis</name> <serial-number>00118</serial-number> <description>M20</description> <chassis-module> <name>Backplane</name> <version>REV 06</version> <part-number>710-001517</part-number> <serial-number>AB5911</serial-number> </chassis-module> <chassis-module> <name>Power Supply A</name> <!-- other child tags of <chassis-module> --> </chassis-module> <!-- other child tags of <chassis> --> </chassis> </chassis-inventory> </rpc-reply>
Mapping Commands to Junos XML Request Tag Elements
You can find information about the available Junos OS operational mode commands and their equivalent Junos XML RPC request tags in the Junos XML API Explorer - Operational Tags tool and the Junos OS CLI. You can use the tool to verify a command, map the command to its equivalent Junos XML RPC request tag and child tags, and view the expected response tag for various Junos OS releases.
You can also display the Junos XML request tag elements for
any operational mode command that has a Junos XML counterpart on the
Junos OS CLI. To display the Junos XML RPC request tags for an operational
mode command, enter the command and pipe it to the display xml
rpc
command.
The following example displays the RPC tags for the show route
command:
user@host> show route | display xml rpc <rpc-reply xmlns:junos="http://xml.juniper.net/junos/10.1I0/junos"> <rpc> <get-route-information> </get-route-information> </rpc> <cli> <banner></banner> </cli> </rpc-reply>
Starting in Junos OS Release 20.3R1, the names of some Junos XML RPC request tags have been updated to ensure consistency across the Junos XML API. Junos devices still accept the old request tag names for backwards compatibility, but we recommend using the new names going forward. To verify the Junos XML RPC request tag for an operational mode command in a given Junos OS release, see the Junos XML API Explorer - Operational Tags tool.
Mapping for Command Options with Variable Values
Many CLI commands have options that identify the object that the command affects or
reports about, distinguishing the object from other objects of the same type. In
some cases, the CLI does not precede the identifier with a fixed-form keyword,
but XML convention requires that the Junos XML API define a tag element for
every option. To learn the names for each identifier (and any other child tag
elements) for an operational request tag element, consult the tag element’s
entry in the appropriate DTD or in the Junos XML API Operational Developer
Reference, or issue the command and command option in the CLI and
append the | display xml rpc
option.
The following
example shows the Junos XML tag elements for two CLI operational commands that
have variable-form options. In the show interfaces
command,
t3-5/1/0:0 is the name of the interface. In the show bgp
neighbor
command, 10.168.1.222 is the IP address for the BGP peer
of interest.

You can display the Junos XML RPC tags for a command and its options in the
CLI by executing the command and command option and appending | display
xml
rpc
.
user@host> show interfaces t3-5/1/0:0 | display xml rpc <rpc-reply xmlns:junos="http://xml.juniper.net/junos/16.1R1/junos"> <rpc> <get-interface-information> <interface-name>t3-5/1/0:0</interface-name> </get-interface-information> </rpc> <cli> <banner></banner> </cli> </rpc-reply>
Mapping for Fixed-Form Command Options
Some CLI commands include options that have a fixed form, such as the
brief
and detail
strings, which specify
the amount of detail to include in the output. The Junos XML API usually maps
such an option to an empty tag whose name matches the option name.
The
following example shows the Junos XML tag elements for the show isis
adjacency
command, which has a fixed-form option called
detail
:

To view the tags in the CLI:
user@host> show isis adjacency detail | display xml rpc <rpc-reply xmlns:junos="http://xml.juniper.net/junos/16.1R1/junos"> <rpc> <get-isis-adjacency-information> <detail/> </get-isis-adjacency-information> </rpc> <cli> <banner></banner> </cli> </rpc-reply>
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.