3 ms·
what's your opinion of using suffix like '_list' to differentiate it ? ie: GET /species and GET /species_list ?
by prisonality 3y ago
what's your opinion of using suffix like '_list' to differentiate it ?
ie:
GET /species
and
GET /species_list
?
- stickfigure 3y agoSeems weird. Of all the rules, #1 one is by far the most arbitrary and least important. But it's also a thoroughly established convention. If you want to present "this is a normal, boring API with few surprises" to your clients, I wouldn't recommend odd collection suffixes. But it's not going to fundamentally change the usability of your API, unlike many of the other rules.
- bonzini 3y agoThe case of having a singular at the end of a GET is so rare that it should be easy to disambiguate. I have a project where one of the main objects is a "series", it's clear what "GET /series" and "GET /series/ID" means to anyone that has seen a REST API.