Rest API - URL and Resource DesignWhy should REST API URLs use nouns instead of verbs?ABecause verbs make URLs shorterBBecause nouns are only used for actionsCBecause verbs are harder to typeDBecause URLs represent resources, which are nounsCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand REST API URL purposeREST API URLs represent resources, which are things or objects, best described by nouns.Step 2: Compare nouns vs verbs in URLsUsing verbs implies actions, but REST uses HTTP methods (GET, POST) to express actions, so URLs stay as nouns.Final Answer:Because URLs represent resources, which are nouns -> Option DQuick Check:REST URL structure = nouns [OK]Quick Trick: Use nouns in URLs; verbs go in HTTP methods [OK]Common Mistakes:Using verbs in URL pathsConfusing resource with actionIgnoring HTTP methods role
Master "URL and Resource Design" in Rest API9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Rest API Quizzes HTTP Methods - DELETE for removing resources - Quiz 13medium HTTP Methods - POST for creating resources - Quiz 4medium HTTP Status Codes - 422 Unprocessable Entity - Quiz 5medium Query Parameters and Filtering - Filtering by field values - Quiz 13medium Query Parameters and Filtering - Pagination with limit and offset - Quiz 2easy REST API Fundamentals - Statelessness requirement - Quiz 3easy Request and Response Format - Response headers (Cache-Control, ETag) - Quiz 7medium Request and Response Format - JSON as standard format - Quiz 7medium Request and Response Format - Error response format - Quiz 3easy URL and Resource Design - Resource identifiers in URLs - Quiz 1easy