Description

This article explains how to fetch the details from the device for any show commands

Solution

If you know the cli command, you can use the below command in Junos CLI to get the corresponding rpc command that we use in the API body:

# show route instance | display xml rpc

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/23.4R2-S4.11/junos">

  <rpc>

    <get-instance-information>

    </get-instance-information>

  </rpc>

  <cli>

    <banner>{master:0}</banner>

  </cli>

</rpc-reply>

 

The above example is for the CLI command “show route instance”

 

If you are unsure about the command, we need to raise a case with the Junos device's serial number

 

Here is the body for the XML format:

 

<netconf>

  <rpcCommands>

    <rpcCommand>

      <![CDATA[<get-instance-information>]]>

    </rpcCommand>

  </rpcCommands>

</netconf>

 

 

 

 

 

Refer to the document Device Manager API for more details

 

If you have any queries on this, please raise a JTAC case

Modification History

2026-09-28 : Article Created