Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !2082

Closed
Created 12 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

fix RESTful design of URLs for merge requests API

  • Overview 10
  • Commits 1
  • Changes 2

Created by: NARKOZ

Keep API URLs RESTful: use plural routes for plural resources.

Loading
Loading

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: vsizov

    What about change version of api?

    By Administrator on 2012-11-27T21:50:59 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    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 called projects or project, 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)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: riyad

    @guilhermeblanco good point :)

    By Administrator on 2012-12-05T12:32:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: dzaporozhets

    Since this definitely brakes compatibility - its for 6.0 version. Also it will require changes in docs etc

    By Administrator on 2013-05-13T16:06:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: bbodenmiller

    @NARKOZ can you start making the requested changes?

    By Administrator on 2013-05-27T00:26:06 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: bassrock

    Is it also possible to make it so that the old urls just redirect, so it does not break compatibility for older versions?

    By Administrator on 2013-06-08T00:18:57 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: NARKOZ

    @bassrock no, you can't redirect POST/PUT requests.

    By Administrator on 2013-06-14T17:22:12 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: bassrock

    +1 @randx

    By Administrator on 2013-07-11T16:42:46 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
6.0
6.0
None
Time tracking
No estimate or time spent
1
Labels
API
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
1
1 participant
user avatar
Reference: gpt/large_projects/gitlabhq1!2082
Source branch: github/fork/NARKOZ/merge-requests-api

    0 pending comments

Menu

Projects Groups Snippets
Help