Usage
<rpc>
<get [format="(json | json-minified | set | text | xml | xml-minified)"]>
<filter type="subtree">
<configuration>
<!-- tag elements representing the configuration elements to return -->
</configuration>
</filter>
</get>
<get>
<filter type="subtree">
<netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
(<capabilities/> | <datastores/> | <schemas/> | <sessions/> | <statistics/>)
</netconf-state>
</filter>
</get>
</rpc>
]]>]]>
Description
Request the committed configuration or NETCONF state information from the NETCONF
server.
Attributes
format |
Specify the return format for the configuration data. If you omit this
attribute, the server returns the configuration data formatted as Junos
XML elements. Acceptable values are:
-
json —Configuration statements are formatted in
JavaScript Object Notation (JSON). Starting in Junos OS Release
14.2, you can display the configuration information in JSON
format.
-
json-minified —Configuration statements are
formatted in JSON with unnecessary spaces, tabs, and newlines
removed.
-
set —Configuration statements are formatted as
Junos OS configuration mode set commands.
-
text —Configuration statements are formatted as
ASCII text, using the newline character, tabs and other white
space, braces, and square brackets to indicate the hierarchical
relationships between the statements. Junos devices use this
format in configuration files and for the
show configuration CLI command output.
-
xml —Configuration statements are represented by
the corresponding Junos XML tag elements. This is the
default.
-
xml-minified —Configuration statements are
represented by the corresponding Junos XML tag elements with
unnecessary spaces, tabs, and newlines removed.
|
Contents
<filter> |
(Optional) Specify the information that the NETCONF server should return.
Acceptable values include:
-
<configuration> —Return the committed
configuration.
To specify the configuration elements to return, optionally
include the Junos XML tag elements that represent all levels of
the configuration hierarchy from the root (represented by the
<configuration> tag element) down to
each element to display.
-
<netconf-state> —Return NETCONF state data
for the requested subtree. You must specify one of the
following:
-
capabilities —NETCONF capabilities
supported by the NETCONF server.
-
datastores —Available configuration
datastores, for example, candidate or running (active),
and their lock state.
-
schemas —Schemas supported on the
device.
-
sessions —Active NETCONF management
sessions on the device.
-
statistics —NETCONF server performance
data.
Note:
The optional type attribute indicates the kind of
syntax used to represent the requested configuration elements or
state information; the only acceptable value is
subtree .
|
Release Information
<netconf-state>
<schemas>
added in Junos OS Release 21.1R1 and Junos OS
Evolved Release 21.1R1.
<netconf-state>
<capabilities>
, <datastores>
,
<sessions>
, and <statistics>
added
in Junos OS Release 23.4R1 and Junos OS Evolved Release 23.4R1.