200-901 exam dumps

200-901 practice question 2 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 2

Select 3

A development team is building a REST API for a network automation application. They want to ensure the API adheres to proper design principles and is easy to maintain. Which of the following guidelines should they follow when designing the API?

  1. A

    Use meaningful and consistent resource naming conventions.

  2. B

    Always use HTTP GET for operations that modify resources.

  3. C

    Include versioning in the API URL for backward compatibility.

  4. D

    Return detailed error messages with proper HTTP status codes.

  5. E

    Avoid using HTTP methods like POST and PUT for security reasons.

Show answer and explanation

Correct answers: A, C, D

Explanation

REST API design should follow principles that promote clarity, maintainability, and usability. Using proper resource naming, versioning, and meaningful error handling improves the API's usability. Misusing HTTP methods like GET for modifying resources or avoiding standard methods such as POST and PUT can lead to poor design and functionality.

  • A. Correct.

    Meaningful and consistent resource naming conventions ensure that the API is intuitive and easy to use.

  • B. Incorrect.

    Using HTTP GET for operations that modify resources violates REST principles, as GET should only be used for retrieving data and should not have side effects.

  • C. Correct.

    Including versioning in the API URL helps maintain backward compatibility and allows for smoother transitions when updating the API.

  • D. Correct.

    Returning detailed error messages and proper HTTP status codes improves debugging and ensures clients understand what went wrong.

  • E. Incorrect.

    Avoiding HTTP methods like POST and PUT is not a best practice; these methods are essential for creating and updating resources in REST APIs when used securely.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam