nerdexam
Juniper

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…

NETCONF, RESTCONF, and gRPC

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

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    7% (2)
  • C
    14% (4)
  • D
    75% (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=text entirely (so output won't be plain text), and incorrectly uses @ instead of ? to start the interface-name parameter.
  • C gets @format=text right but then uses & to introduce interface-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

#curl REST API#RPC call syntax#format parameter#interface information RPC

Community Discussion

No community discussion yet for this question.

Full JN0-224 Practice