To request the rescue configuration, a client application emits the <get-rescue-information> tag element in an <rpc> tag element. This operation is equivalent to the show system configuration rescue operational mode command.
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 or the request system configuration rescue save CLI operational mode command. For more information, see the JUNOS XML API Operational Reference or the JUNOS System Basics and Services Command Reference.)
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 tag elements are the default):
<rpc>
<get-rescue-information/>
</rpc>
The JUNOScript 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 Requesting Information from the Committed or Candidate Configuration.
<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 JUNOScript server encloses its response in <rpc-reply>, <rescue-information>, <configuration-information>, and <configuration-output> tag elements. For more information about how ASCII output is formatted, see Requesting Output as Formatted ASCII Text or JUNOS XML Tag Elements.
<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>