0

I'm building a RESTful API amongst others I have the following endpoint:

  • /api/feedback

REST resources should use their plural forms. In this case, Feedback is a mass noun, that is it doesn't have a plural form. How should I deal with it?

Should it be /api/feedback or /api/feedbacks?

Stalin Kay
  • 577
  • 8
  • 18
  • "*Feedback*" is an uncountable noun. As such, it has no plural form. So, just use `/api/feedback`. – cassiomolin Dec 04 '15 at 09:36
  • if this is a POST service you can just use `api/feedback`. Its meaning will be "POST one feedback". The singular/plural problem would happen only for GET services, where you'd have to distinguish between "GET all feedbacks" and "GET one feedback". In this case, you would typically have `api/feedbacks` for the former and `api/feedbacks/{id}` for the latter. – francesco foresti Dec 04 '15 at 09:58
  • Thanks guys. I like @FrancescoForesti 's suggestion. That helps to resolve GET request for one and many requests. – Stalin Kay Dec 04 '15 at 10:02

0 Answers0