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
  • Issues
  • #8789

Closed
Open
Created 10 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

API requires object ID, but impossible to resolve IID to ID effectively

Closed

API requires object ID, but impossible to resolve IID to ID effectively

Created by: dmaslakov

My use case: webhook parses commit messages to find out merge request reference (!123), then webhook needs author of merge request.

The problem here is 123 which is merge request IID, while API calls require ID.

To find IID of merge request I see the only way -- do iterate over all merge requests (using GET /projects/:id/merge_requests). But this is far from being effective.

I propose the following options:

  1. Do not use ID in calls, because GET /projects/:id/merge_request/:merge_request_id already assumes the object under particular project and it's OK to identify merge request in scope of the project, i.e. use IID. Unfortunately it breaks backward compatibility.
  2. Create new method that will resolve IID to ID and vice versa for any object type.
  3. Extend existing methods to take both IID and ID. For example, extend method GET /projects/:id/merge_request/:merge_request_id so that it accepts IID like GET /projects/:id/merge_request/:merge_request_IID?local=true.

Linked issues
...

    Related merge requests

    • 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
    Assign to
    Milestone
    No milestone
    None
    None
    Time tracking
    Due date
    None
    None
    1
    Labels
    API
    Assign labels
    • No matching results
    • Manage project labels
    Confidentiality
    Not confidential

    You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

    Lock issue
    Unlocked
    participants
    Reference:

    Menu

    Projects Groups Snippets
    Help