JN0-224 · Question #75
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…
The correct answer is D. curl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@format=text?interface-name=ge-0/0/0&terse=". Option D correctly follows Juniper's REST API URL syntax, where the output format is appended to the RPC method name using the @ symbol (get-interface-information@format=text), and then query parameters begin with ? and are separated by & (?interface-name=ge-0/0/0&terse=). This…
Question
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? information&format=text&interface-name=ge- 0/0/0&terse=" name=ge-0/0/0?terse=" information@format=text&interface-name=ge-0/0/0? terse=" information@format=text?interface-name=ge- 0/0/0&terse="
Options
- Acurl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information&format=text&interface-name=ge-0/0/0&terse="
- Bcurl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@interface-name=ge-0/0/0?terse="
- Ccurl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@format=text&interface-name=ge-0/0/0?terse="
- Dcurl ""u "lab:lab123" "http://10.210.10.155:3000/rpc/get-interface-information@format=text?interface-name=ge-0/0/0&terse="
How the community answered
(28 responses)- A4% (1)
- B7% (2)
- C14% (4)
- D75% (21)
Explanation
Option D correctly follows Juniper's REST API URL syntax, where the output format is appended to the RPC method name using the @ symbol (get-interface-information@format=text), and then query parameters begin with ? and are separated by & (?interface-name=ge-0/0/0&terse=). This @format notation is Juniper-specific - it modifies the RPC call itself, not a query parameter.
Why the distractors fail:
- A uses
&after the RPC name instead of@for the format, and never uses?to properly start the query string - all separators are wrong. - B omits the
@format=textentirely (so output won't be plain text), and incorrectly uses@instead of?to start the interface-name parameter. - C gets
@format=textright but then uses&to introduceinterface-name- this skips the required?that must begin the query string, making the URL malformed.
Memory tip: Think of Juniper REST API URLs as having two distinct zones separated by ? - everything before ? is the RPC identity (name + @format), and everything after ? are the RPC parameters chained with &. If format or the ? boundary is in the wrong zone, the request breaks.
Topics
Community Discussion
No community discussion yet for this question.