Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Upload Configuration Data as a Data Stream Using the Junos XML Protocol

date_range 14-Jul-21

In a Junos XML protocol session with a device running Junos OS, to upload configuration data as a data stream, a client application encloses the <load-configuration> tag element in an <rpc> tag element.

To define the configuration elements to change as Junos XML tag elements, the application emits the tag elements representing all levels of the configuration hierarchy from the root (represented by the <configuration> tag element) down to each element to change.

content_copy zoom_out_map
<rpc>
    <load-configuration>
        <configuration>
            <!-- tag elements representing the configuration data -->
        </configuration>
    </load-configuration>
</rpc>

To define the configuration data to change as formatted ASCII text, the application encloses the statements in a <configuration-text> tag element and includes the format="text" attribute in the opening <load-configuration> tag.

content_copy zoom_out_map
<rpc>
    <load-configuration format="text">
        <configuration-text>
             /* formatted ASCII configuration data */
        </configuration-text>
    </load-configuration>
</rpc>

To define the configuration data to change as Junos OS configuration mode set commands, the application encloses the commands in a <configuration-set> tag element and includes the action="set" and format="text" attributes in the opening <load-configuration> tag.

content_copy zoom_out_map
<rpc>
    <load-configuration action="set" format="text">
        <configuration-set>
             /* configuration mode commands */
        </configuration-set>
    </load-configuration>
</rpc>

Starting in Junos OS Release 16.1, you can load configuration data formatted using JavaScript Object Notation (JSON) on devices running Junos OS. To define the configuration data to change as JSON format, the application encloses the data in a <configuration-json> tag element and includes the format="json" attribute in the opening <load-configuration> tag.

content_copy zoom_out_map
<rpc>
    <load-configuration format="json">
        <configuration-json>
             /* JSON-formatted configuration data */
        </configuration-json>
    </load-configuration>
</rpc>

For information about the syntax for Junos XML tag elements, formatted ASCII text, configuration mode commands, and JSON format, see Defining the Format of Configuration Data to Upload in a Junos XML Protocol Session.

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.

Release
Description
16.1
Starting in Junos OS Release 16.1, you can load configuration data formatted using JavaScript Object Notation (JSON) on devices running Junos OS.
external-footer-nav