Bird
0
0

Which of the following is the best noun-based REST API endpoint to represent a collection of user profiles?

easy📝 Conceptual Q1 of 15
Rest API - URL and Resource Design
Which of the following is the best noun-based REST API endpoint to represent a collection of user profiles?
A/userProfilesList
B/getUsers
C/users
D/fetchUsers
Step-by-Step Solution
Solution:
  1. Step 1: Identify noun-based resource naming

    REST API endpoints should use plural nouns to represent collections.
  2. Step 2: Evaluate options

    /users uses the plural noun 'users' without verbs or actions, which is correct. Options B, C, and D include verbs or unnecessary words.
  3. Final Answer:

    /users -> Option C
  4. Quick Check:

    Plural noun without verbs [OK]
Quick Trick: Use plural nouns without verbs for collections [OK]
Common Mistakes:
  • Including verbs in resource names
  • Using singular nouns for collections
  • Adding action words like 'get' or 'fetch'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes