- 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 Request Operational and Configuration Information Using the Junos XML Protocol
- play_arrow Request Operational Information Using the Junos XML Protocol
- play_arrow Request Configuration Information Using the Junos XML Protocol
- Request Configuration Data Using the Junos XML Protocol
- Specify the Source for Configuration Information Requests in a Junos XML Protocol Session
- Specify the Output Format for Configuration Data in a Junos XML Protocol Session
- Request Commit-Script-Style XML Configuration Data Using the Junos XML Protocol
- Specify the Output Format for Configuration Groups and Interface Ranges Using the Junos XML Protocol
- Request Identifier Indicators for Configuration Elements Using the Junos XML Protocol
- Request Change Indicators for Configuration Elements Using the Junos XML Protocol
- Specify the Scope of Configuration Data to Return in a Junos XML Protocol Session
- Request the Complete Configuration Using the Junos XML Protocol
- Request a Configuration Hierarchy Level or Container Object Without an Identifier Using the Junos XML Protocol
- Request All Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Specific Number of Configuration Objects Using the Junos XML Protocol
- Request Identifiers for Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Single Configuration Object Using the Junos XML Protocol
- Request Subsets of Configuration Objects Using Regular Expressions
- Request Multiple Configuration Elements Using the Junos XML Protocol
- Retrieve a Previous (Rollback) Configuration Using the Junos XML Protocol
- Retrieve the Rescue Configuration Using the Junos XML Protocol
- Compare the Active or Candidate Configuration to a Prior Version Using the Junos XML Protocol
- Compare Two Previous (Rollback) Configurations Using the Junos XML Protocol
- Request an XML Schema for the Configuration Hierarchy Using the Junos XML Protocol
-
- play_arrow Junos XML Protocol Utilities
- play_arrow Develop Junos XML Protocol C Client Applications
-
- play_arrow Configuration Statements and Operational Commands
Upload Configuration Data as a File Using the Junos XML Protocol
In a Junos XML protocol session with a device running Junos
OS, to upload configuration data stored in a file, a client application
encloses the <load-configuration/>
tag
with the url
attribute in an <rpc>
tag element.
If the data is Junos XML tag elements, either include
the format="xml"
attribute or omit the format
attribute, which defaults to XML.
<rpc> <load-configuration url="file-location"/> </rpc>
If the data is formatted ASCII text, include the format="text"
attribute.
<rpc> <load-configuration url="file-location" format="text"/> </rpc>
If the data is configuration mode set
commands,
include the action="set"
and format="text"
attributes.
<rpc> <load-configuration url="file-location" action="set" format="text"/> </rpc>
Starting in Junos
OS Release 16.1, you can load configuration data formatted using JavaScript
Object Notation (JSON) on devices running Junos OS. If the data uses JSON format, include the format="json"
attribute.
<rpc> <load-configuration url="file-location" format="json"/> </rpc>
Before loading the file, the client application or an administrator
saves the configuration data as the contents of the file. Enclose
Junos XML tag elements in a <configuration>
tag element. For information about the syntax for the data in the
file, see Defining the Format of Configuration
Data to Upload in a Junos XML Protocol Session.
Configuration data formatted as ASCII text, Junos OS configuration
mode commands, or JSON data is not enclosed in <configuration-text>
, <configuration-set>
, or <configuration-json>
tag elements when it is loaded
from a file.
The value of the url
attribute
can be a local file path, an FTP location, or a Hypertext Transfer
Protocol (HTTP) URL:
A local filename can have one of the following forms:
/path/filename—File on a mounted file system, either on the local flash disk or on hard disk.
a:filename or a:path/filename—File on the local drive. The default path is / (the root-level directory). The removable media can be in MS-DOS or UNIX (UFS) format.
A filename on an FTP server has the following form:
content_copy zoom_out_mapftp://username:password@hostname/path/filename
A filename on an HTTP server has the following form:
content_copy zoom_out_maphttp://username:password@hostname/path/filename
In each case, the default value for the path variable is the home directory for the username. To specify an absolute
path, the application starts the path with the characters %2F; for
example, ftp://username:password@hostname/%2Fpath/filename
.
The url
attribute can be combined
with one or more of the following attributes in the <load-configuration/>
tag:
format
action
The following example shows how to incorporate Junos XML-tagged
configuration data stored in the file /var/configs/user-accounts on the FTP server called cfg-server.mycompany.com. The opening <load-configuration>
tag appears on two lines for
legibility only.

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.