Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



JunosĀ® OS REST API Guide

https://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/rest-api/rest-api.pdf






Code Block
titlerest config
vagrant@vqfx-re> show configuration system services
. . .
rest {
    http {
        port 8080;
    }
    enable-explorer;
}


vagrant@vqfx-re> show configuration system services | display set
set system services ssh root-login allow
set system services netconf ssh
set system services rest http port 8080
set system services rest enable-explorer


work out the rpc command


Code Block
titlerpc call
root> show interfaces | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos">
    <rpc>
        <get-interface-information>
        </get-interface-information>
    </rpc>
    <cli>
        <banner></banner>
    </cli>
</rpc-reply>

root>


root> show interfaces ge-0/0/0.0 | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos">
    <rpc>
        <get-interface-information>
                <interface-name>ge-0/0/0.0</interface-name>
        </get-interface-information>
    </rpc>
    <cli>
        <banner></banner>
    </cli>
</rpc-reply>

root> show interfaces ge-0/0/0.0 terse | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos">
    <rpc>
        <get-interface-information>
                <terse/>
                <interface-name>ge-0/0/0.0</interface-name>
        </get-interface-information>
    </rpc>
    <cli>
        <banner></banner>
    </cli>
</rpc-reply>


show interfaces/rpc/get-interface-information
show interfaces ge-0/0/0.0/rpc/get-interface-information
show interfaces ge-0/0/0.0 terseĀ /rpc/get-interface-information