fix RESTful design of URLs for merge requests API
Created by: NARKOZ
Keep API URLs RESTful: use plural routes for plural resources.
Created by: riyad
@vsizov +1 This definitely brakes compatibility. @NARKOZ Or you could "alias"/"redirect" calls to the old routes to the new ones and mark the old ones as deprecated. This won't break client code and the API version could stay the same.
By Administrator on 2012-11-27T22:03:34 (imported from GitLab project)
Created by: guilhermeblanco
REST advocate that endpoints (noums) should always match no matter what method/verb you're referring to. This means
GET /projects
,GET /projects/:id
,POST /projects
,PUT /projects/:id
should all behave to a resource calledprojects
orproject
, in an interchangeable fashion.What needs to be consistent (and it's the point of discussion for everyone) if even the resource should be pluralized or singularized. It doesn't seem to have an explicit consensus, but it's recommended that once you choose one, all the remaining API needs to follow the same concept. Again, calling one API as projects, means that your entire application should be named equally. This covers /project/new, /issue/new, etc. Considering plural, makes you turn all routes into plural also.
ApiGee and many others recommend to use plurals for API: http://blog.apigee.com/detail/restful_api_design_plural_nouns_and_concrete_names Others advocate the a resource could be considered as a representation of a single record, which would infer that your Entity is singular, thus leading to a singular name.
So guys, whatever you decide, just keep it consistent. =)
By Administrator on 2012-12-05T07:27:14 (imported from GitLab project)
Created by: dzaporozhets
I dont want people to rewrite their API Client code because of such minor change. Yes it was mistake to make it non restful. But unless we got some real reason to break api compatibility - lets leave as is.
By Administrator on 2013-07-11T16:37:56 (imported from GitLab project)