JN0-224 practice question 3 of 15
You are asked to use the REST API to retrieve interface configuration information from your Junos device. You decide to use a cURL HTTP GET command to retrieve this information. In this scenario, which two statements are correct? (Choose two.)
Full set: 66 questionsThe Junos REST API is a stateless interface, meaning each request must be independently authenticated. This is typically done using HTTP Basic Authentication, where credentials are sent in the Authorization header of every API call. The API is designed for programmatic interaction and returns structured data. By default, the output is in XML, which is the native format for Junos configuration. However, you can request the output in JSON format by setting the HTTP Accept header to application/json, making both XML and JSON supported formats for retrieving configuration data.
A. The Junos REST API returns structured data formats like XML and JSON, not a presentation format like HTML for configuration information.
B. The REST API operates over HTTP or HTTPS and is configured under [edit system services rest]. It is independent of the SSH service.
1. Juniper Networks TechLibrary, REST API Guide, "Specifying the Output Format for REST API Requests": This document states, "By default, the REST API returns data in XML format. You can, however, request that the data be returned in JavaScript Object Notation (JSON) format... To specify the output format, include the appropriate value for the Accept header in the request." It lists application/xml and application/json as the primary values. This supports option C and refutes A.
2. Juniper Networks TechLibrary, REST API Guide, "Authenticating REST API Users": This section clarifies the authentication mechanism: "The Junos OS REST API uses HTTP Basic Authentication to authenticate users for each API request... The client is responsible for including the Authorization header in all REST API requests." This directly supports option D.
3. Juniper Networks TechLibrary, REST API Guide, "Enabling the REST API": This guide details the configuration required to enable the REST API service, which involves setting set system services rest http or https and does not mention any dependency on the SSH service. This refutes option B.
Keep practicing
Take the free JN0-224 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other JN0-224 practice questions
- Question 1You want to use a Python package or module. In this scenario, which statement would accom…
- Question 2Which two data structures are used in JSON? (Choose two.)
- Question 4Which two statements are valid regarding Junos automation? (Choose two.)
- Question 5Which data construct is used to guarantee that element names and data values remain uniqu…
- Question 6Which statement is correct about DevOps?
- Question 7YAML uses which two data structures? (Choose two.)
