Automation

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



  • 1.  JUNOS REST API to load configuration

    Posted 04-12-2021 23:57
      |   view attached
    Hi! Experts 
    Sorry for disturbing, I am testing JUNOS REST API to do configuration maintenance, but JUNOS response with status 400 and configuration is not applied. Could you pls shed some light on this? Thanks for your great support.
    The configuration I want to added is :
    lab@mx240-re0# show interfaces              
    ge-1/1/2 {
        unit 0 {
            family inet {
                address 10.1.1.1/30;
            }
        }
    }
    The REST http request body is :  "<lock-configuration/><load-configuration><configuration><interface><name>ge-1/1/2</name><unit><name>0</name><family><inet><address><name>10.1.1.1/30</name></address></inet></family></unit></interface></interfaces></configuration></load-configuration><commit/><unlock-configuration/>"



  • 2.  RE: JUNOS REST API to load configuration

    Posted 04-13-2021 08:28

     

    Hi, you miss <interfaces> between <configuration> and <interface>

     

     


    Juniper Business Use Only






  • 3.  RE: JUNOS REST API to load configuration

    Posted 04-13-2021 10:30
    Sure, you are right and it works, Thanks a lot. :)