JNCIA-DevOps: Juniper Networks Certified Associate – Automation (2021) — Question 30
While conducting an automation test, you must issue a command using the curl tool to request the text formatted output from the show interfaces ge-
0/0/0 terse command.
In this scenario, which command would you use?
Answer options
- A. curl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information&format=text&interface-name=ge- 0/0/0&terse="
- B. curl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@interface-name=ge-0/0/0?terse="
- C. curl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@format=text&interface-name=ge-0/0/0? terse="
- D. curl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@format=text?interface-name=ge- 0/0/0&terse="
Correct answer: B
Explanation
The correct answer, B, uses the correct syntax for the curl command to request the text formatted output with proper parameters. Option A incorrectly uses '&' for separating parameters in the URL, while C and D misuse the placement of '@' and '?' which affects the request format. Thus, only option B accurately formats the URL for the desired output.