- play_arrow Overview
- play_arrow Junos XML Management Protocol and Junos XML API Overview
- play_arrow Junos XML Protocol and Junos XML Tags Overview
- XML and Junos OS Overview
- XML Overview
- XML and Junos XML Management Protocol Conventions Overview
- Map Junos OS Commands and Command Output to Junos XML Tag Elements
- Map Configuration Statements to Junos XML Tag Elements
- Using Configuration Response Tag Elements in Junos XML Protocol Requests and Configuration Changes
- play_arrow Junos XML Protocol and JSON Overview
-
- play_arrow Manage Junos XML Protocol Sessions
- play_arrow Junos XML Protocol Session Overview
- play_arrow Manage Junos XML Protocol Sessions
- Satisfy the Prerequisites for Establishing a Connection to the Junos XML Protocol Server
- Configure clear-text or SSL Service for Junos XML Protocol Client Applications
- Connect to the Junos XML Protocol Server
- Start a Junos XML Protocol Session
- Authenticate with the Junos XML Protocol Server for Cleartext or SSL Connections
- Send Requests to the Junos XML Protocol Server
- Parse the Junos XML Protocol Server Response
- Parse Response Tag Elements Using a Standard API in NETCONF and Junos XML Protocol Sessions
- How Character Encoding Works on Juniper Networks Devices
- Handle an Error or Warning in Junos XML Protocol Sessions
- Halt a Request in Junos XML Protocol Sessions
- Lock, Unlock, or Create a Private Copy of the Candidate Configuration Using the Junos XML Protocol
- Terminate a Junos XML Protocol Session
- End a Junos XML Protocol Session and Close the Connection
- Sample Junos XML Protocol Session
- play_arrow Junos XML Protocol Tracing Operations
- play_arrow Junos XML Protocol Operations
- play_arrow Junos XML Protocol Processing Instructions
- play_arrow Junos XML Protocol Response Tags
- play_arrow Junos XML Element Attributes
- active
- count
- delete
- inactive
- insert
- junos:changed
- junos:changed-localtime
- junos:changed-seconds
- junos:commit-localtime
- junos:commit-seconds
- junos:commit-user
- junos:group
- junos:interface-range
- junos:key
- junos:position
- junos:total
- matching
- protect
- recurse
- rename
- replace
- replace-pattern
- start
- unprotect
- xmlns
-
- play_arrow Manage Configurations Using the Junos XML Protocol
- play_arrow Change the Configuration Using the Junos XML Protocol
- Request Configuration Changes Using the Junos XML Protocol
- Upload and Format Configuration Data in a Junos XML Protocol Session
- Upload Configuration Data as a File Using the Junos XML Protocol
- Upload Configuration Data as a Data Stream Using the Junos XML Protocol
- Define the Format of Configuration Data to Upload in a Junos XML Protocol Session
- Specify the Scope of Configuration Data to Upload in a Junos XML Protocol Session
- Replace the Configuration Using the Junos XML Protocol
- Create, Modify, or Delete Configuration Elements Using the Junos XML Protocol
- Create New Elements in Configuration Data Using the Junos XML Protocol
- Merge Elements in Configuration Data Using the Junos XML Protocol
- Replace Elements in Configuration Data Using the Junos XML Protocol
- Replace Only Updated Elements in Configuration Data Using the Junos XML Protocol
- Delete Elements in Configuration Data Using the Junos XML Protocol
- Rename Objects In Configuration Data Using the Junos XML Protocol
- Reorder Elements In Configuration Data Using the Junos XML Protocol
- Protect or Unprotect a Configuration Object Using the Junos XML Protocol
- Change a Configuration Element’s Activation State Using the Junos XML Protocol
- Change a Configuration Element’s Activation State Simultaneously with Other Changes Using the Junos XML Protocol
- Replace Patterns in Configuration Data Using the NETCONF or Junos XML Protocol
- play_arrow Commit the Configuration on a Device Using the Junos XML Protocol
- Verify Configuration Syntax Using the Junos XML Protocol
- Commit the Candidate Configuration Using the Junos XML Protocol
- Commit a Private Copy of the Configuration Using the Junos XML Protocol
- Commit a Configuration at a Specified Time Using the Junos XML Protocol
- Commit the Candidate Configuration Only After Confirmation Using the Junos XML Protocol
- Commit and Synchronize a Configuration on Redundant Control Planes Using the Junos XML Protocol
- Log a Message About a Commit Operation Using the Junos XML Protocol
- View the Configuration Revision Identifier for Determining Synchronization Status of Devices with NMS
- 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
-
- play_arrow Junos XML Protocol Utilities
- play_arrow Develop Junos XML Protocol C Client Applications
-
- play_arrow Configuration Statements and Operational Commands
Retrieve the Rescue Configuration Using the Junos XML Protocol
The rescue configuration is a configuration saved in case it
is necessary to restore a valid, nondefault configuration. (To create
a rescue configuration, use the Junos XML <request-save-rescue-configuration>
tag element in a Junos XML protocol session or the request
system configuration rescue save
operational mode command in
the CLI. For more information, see the Junos XML API Operational Developer Reference or
the CLI Explorer.)
In a Junos XML protocol session with a device running Junos
OS, a client application requests the rescue configuration by emitting
the Junos XML <get-rescue-information>
tag element in an <rpc>
element. This
operation is equivalent to the show system configuration rescue
operational mode command.
To request Junos XML-tagged output, the application either
includes the <format>
tag element with
the value xml
or omits the <format>
tag element (Junos XML output is the default):
<rpc> <get-rescue-information/> </rpc>
The Junos XML protocol server encloses its response in <rpc-reply>
, <rescue-information>
, and <configuration>
tag elements.
The <load-success/>
tag is a side effect
of the implementation and does not affect the results. For information
about the attributes in the opening <configuration>
tag, see Specifying the Source for Configuration
Information Requests in a Junos XML Protocol Session.
<rpc-reply xmlns:junos="URL"> <rescue-information> <load-success/> <configuration attributes> <!-- tag elements representing the rescue configuration --> </configuration> </rescue-information> </rpc-reply>
To request formatted ASCII output, the application includes
the <format>
tag element with the value text
.
<rpc> <get-rescue-information> <format>text</format> </get-rescue-information> </rpc>
The Junos XML protocol server encloses its response in <rpc-reply>
, <rescue-information>
, <configuration-information>
, and <configuration-output>
tag elements. For more information
about the formatted ASCII notation used in Junos OS configuration
statements, see Specifying the Output
Format for Configuration Data in a Junos XML Protocol Session.
<rpc-reply xmlns:junos="URL"> <rescue-information> <load-success/> <configuration-information> <configuration-output> <!-- formatted ASCII text representing the rescue configuration --> </configuration-output> </configuration-information> </rescue-information> </rpc-reply>
Starting in Junos
OS Release 16.1, to request the rescue configuration in JSON format,
the application includes the <format>
tag element with the value json
in the <get-rescue-information>
element. Prior to Junos OS Release 16.1, JSON-formatted data is requested
by including the format="json"
attribute
in the opening <get-rescue-information>
tag.
<rpc> <get-rescue-information> <format>json</format> </get-rescue-information> </rpc>
When you use the format="json"
attribute to specify the format, the Junos XML protocol server encloses
its response in an <rpc-reply>
element,
the field name for the top-level JSON member is "rescue-information"
, and the emitted configuration data uses an older implementation
for serialization. When you use the <format>json</format>
element to request JSON-formatted data, the Junos XML protocol server
encloses its response in <rpc-reply>
, <rescue-information>
, <configuration-information>
, and <json-output>
tag elements, the field name for the top-level JSON member is "configuration"
, and the emitted configuration data
uses a newer implementation for serialization.
<rpc-reply xmlns:junos="URL"> <rescue-information> <load-success/> <configuration-information> <json-output> { "configuration" : { <!-- JSON data representing the rescue configuration --> } } </json-output> </configuration-information> </rescue-information> </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.
<format>
tag element with the value json
in the <get-rescue-information>
element.