- 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
Request Change Indicators for Configuration Elements Using the Junos XML Protocol
In a Junos XML protocol session with a device running
Junos OS, to request that the server indicate which configuration
elements have changed since the last commit, a client application
includes the changed="changed"
attribute
in the <get-configuration/>
request
tag. It encloses the request in an <rpc>
tag element:
<rpc> <get-configuration changed="changed"/> <!-- OR --> <get-configuration changed="changed"> <!-- tag elements for the configuration elements to return --> </get-configuration> </rpc>
For information about the tag elements to enclose in the <get-configuration>
tag element, see Specifying the Scope of Configuration Data to Return
in a Junos XML Protocol Session.
The configuration source determines which elements are marked
as changed. When the database="candidate"
attribute is included in the <get-configuration/>
tag or when the database
attribute is
omitted, the candidate configuration is compared to the active configuration.
Elements added to the candidate configuration after the last commit
operation are marked with the junos:changed="changed"
attribute. When the database="committed"
attribute is included in the <get-configuration/>
tag, the active configuration is compared to the first rollback
configuration. Elements added to the active configuration by the most
recent commit are marked with the junos:changed="changed"
attribute.
The Junos XML protocol server indicates which elements have
changed by including the junos:changed="changed"
attribute in the opening tag of every parent tag element in the
path to the changed configuration element. If the changed configuration
element is represented by a single (empty) tag, the junos:changed="changed"
attribute appears in the tag. If the changed element is represented
by a container tag element, the junos:changed="changed"
attribute appears in the opening container tag and also in the opening
tag for each child tag element enclosed in the container tag element.
The Junos XML protocol server encloses its response in <rpc-reply>
and <configuration>
tag elements. For information about the standard 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"> <configuration standard-attributes junos:changed="changed"> <!-- opening-tag-for-each-parent-level junos:changed="changed" --> <!-- For each changed element, EITHER --> <element junos:changed="changed"/> <!-- OR --> <element junos:changed="changed"> <first-child-of-element junos:changed="changed"> <second-child-of-element junos:changed="changed"> <!-- additional children of element --> </element> <!-- closing-tag-for-each-parent-level --> </configuration> </rpc-reply>
If the requested output format is JSON, the Junos XML protocol
server includes the "junos:changed" : "changed"
attribute in the attribute lists for the same elements as described
previously and encloses the response in <configuration-json>
and <rpc-reply>
tag elements.
Starting in Junos OS Release 16.1, devices running Junos OS emit JSON-formatted configuration data using a new default implementation for serialization. The new default uses the "@" symbol instead of the field name "attribute" to indicate an attribute.
When a commit operation succeeds, the Junos XML protocol
server removes the junos:changed="changed"
attribute from all tag elements. However, if warnings are generated
during the commit, the attribute is not removed. In this case, the junos:changed="changed"
attribute appears on tag elements
that changed before the commit as well as those that changed after
the commit.
An example of a commit-time warning is the message explaining
that a configuration element will not actually apply until the device
is rebooted. The warning appears in the tag string that the Junos
XML protocol server returns to confirm the success of the commit,
enclosed in an <xnm:warning>
tag element.
To remove the junos:changed="changed"
attribute from elements that changed before the commit, the client
application must take any action necessary to eliminate the cause
of the warning, and commit the configuration again.
The changed
attribute can
be combined with one or more of the following other attributes in
the <get-configuration/>
tag or opening <get-configuration>
tag:
database
, which is described in Specifying the Source for Configuration Information Requests in a Junos XML Protocol Session. Request change indicators in either the candidate or active configuration.inherit
and optionallygroups
andinterface-ranges
, which are described in Specifying the Output Format for Configuration Groups and Interface Ranges Using the Junos XML Protocol.junos:key
, which is described in Requesting Identifier Indicators for Configuration Elements Using the Junos XML Protocol.
It does not make sense to combine the changed
attribute with the format="text"
attribute
or with the compare
attribute, which produces
only text output. The junos:changed="changed"
attribute appears only in Junos XML-tagged output, which is
the default output format, and in JSON output. When the commit-scripts="view"
attribute is included in the <get-configuration>
tag, the junos:changed="changed"
attribute is automatically included in the output, and you do not
need to explicitly include this attribute in the <get-configuration>
request.
The application can also include the changed
attribute after requesting an indicator for identifiers (as described
in Requesting Identifier Indicators for
Configuration Elements Using the Junos XML Protocol).
The following example shows how to request change indicators
for configuration elements at the [edit system syslog]
hierarchy level in the candidate configuration. The output indicates
that a log file called interactive-commands has been configured since the last commit.

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.