300-435 Question 1
Single answerA network engineer is automating a multi-vendor network environment using RESTful APIs. They need to retrieve information about operational data, such as interface status, from a Cisco device. Which HTTP method should they use to ensure the API request is aligned with RESTful principles?
- A
GET
- B
POST
- C
PUT
- D
DELETE
Show answer and explanation
Correct answer: A
Explanation
In RESTful APIs, the GET method is specifically designed for retrieving information from a server without modifying the resource. Operational data, such as interface status, can be fetched using the GET method to ensure compliance with RESTful principles and avoid unintended changes to the data.
- A. Correct.
GET is the appropriate HTTP method for retrieving data from a resource without making any changes to it, which aligns with the requirement to retrieve operational data.
- B. Incorrect.
POST is used to create new resources or submit data to a resource for processing, but it is not suitable for retrieving data.
- C. Incorrect.
PUT is used to update or replace an existing resource, which does not align with the requirement to retrieve operational data.
- D. Incorrect.
DELETE is used to remove a resource from the server, which is unrelated to retrieving operational data.