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.)
A.
You can retrieve this data in HTML or JSON formats.
B.
You must have SSH enabled on the Junos device.
C.
You can retrieve this data in XML or JSON formats.
D.
You must Include the authentication Information with each request.
When using the REST API to retrieve interface configuration information from a Junos device:
Data Formats (C): The information can be retrieved inXMLorJSONformats. These are the two standard data formats supported by the Junos REST API for representing configuration and operational data.
Authentication (D): For each HTTP request, especially when using tools like cURL,authentication information must be included. This is typically done using basic authentication (username and password) or an authentication token.
Option A is incorrect because HTML is not a supported format for REST API data retrieval in Junos, andOption B is incorrectbecause SSH is not required for REST API requests; the REST API typically uses HTTP/HTTPS.
Junos REST API Documentation: Details the data formats (XML, JSON) supported by the Junos REST API and the need for authentication.
cURL Usage with REST API: Provides examples of how to use cURL with Junos REST API, including the necessity of providing authentication.
References:
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit