JNCIS-DevOps: Juniper Networks Certified Specialist – DevOps — Question 14
Which command is valid for accessing a Junos device using the RESTful API on the default port?
Answer options
- A. curl http://192.168.1.1/rpc/get-interface-information?interface-name=1o0 –u "user:pass123"
- B. curl http://user:[email protected]/rpc/get-interface-information?interface-name=1o0
- C. curl –u "user:pass123" http://192.168.1.1:80/rpc/get-interface-information?interface-name=1o0
- D. curl http://user:[email protected].:3000/rpc/get-interface-information?interface-name=1o0
Correct answer: C
Explanation
The correct answer is C because it uses the default HTTP port (80) and includes the proper authentication format. Option A lacks the port specification, which defaults to 80 but does not clearly indicate it, while option B incorrectly places the user credentials in the URL, and option D uses the wrong port (3000) instead of the default.