Which endpoint follows REST naming best practice for listing students?

  1. GET /api/students
  2. POST /api/students/list
  3. GET /getAllStudents
  4. GET /api/studentlist.php?action=get
Answer

A) GET /api/students

Use plural nouns for resources and HTTP methods for actions.

Computer Science MCQ · More Web Services: Accessing and Creating MCQs · Practise