JN0-223 practice question 2 of 15

A REST API client uses which two HTTP methods to execute RPC requests on the server? (Choose two.)

Full set: 66 questions
Answer options
A: POST Correct answer
B: HEAD
C: GET Correct answer
D: CONNECT
Correct Answer:
A. POST; C. GET
Explanation

The Junos OS REST API provides a framework for remotely executing Remote Procedure Calls (RPCs) on a device. To invoke an RPC, a client application sends an HTTP request to the specific RPC resource endpoint. The API supports two primary HTTP methods for this purpose: GET and POST. The GET method is typically used for simple, idempotent RPCs where the command can be encoded directly in the URL. The POST method is used for all RPCs, including those that require data to be sent in the request body, such as configuration changes or more complex operational commands.

Why Incorrect

B. HEAD: The HEAD method is used to retrieve the HTTP headers for a resource without the message body, which is not applicable for executing a command and receiving its output.
D. CONNECT: The CONNECT method is used to establish a network tunnel, typically for proxying HTTPS traffic, and is not used for application-level RPC execution.

References

1. Juniper Networks Documentation: Junos OS REST API Guide.

Reference: In the section "Executing RPCs Using the REST API

" the guide explicitly states

"To execute an RPC

a client application sends an HTTP GET or POST request to the RPC resource endpoint on the target device." This section also provides distinct examples for executing RPCs using both GET and POST requests. (Source: Juniper TechLibrary

Junos OS REST API Guide).

Scroll to Top