Merge api docs calls for using iid in url, but it doesn't seem to be using it.

When visiting a merge request via the browser:

  • Url: /test-group/test-project/merge_requests/3
  • Title: MR1

From the api:

  • Url: /api/v3/projects/1/merge_requests/3
  • Title: MR2

When are these MR's different? The merge request returned from the API is wrong.

From the api docs here:

GET /projects/:id/merge_requests/:merge_request_iid

From the webhooks, I am getting an iid of 3, and then making another call to the API using that id, and I am getting a different merge request back.

Can someone clarify what I am seeing here? It seems that I need to make my API calls with id, instead of iid, even though the documentation says to use iid.

edit: The correct url for the merge request I am interested in is apparently /api/v3/projects/1/merge_requests/4/approvals, which doesn't seem to match the docs.

Here is the response (some fields ommited):

{
  "id": 4,
  "iid": 3,
  "project_id": 1,
  "title": "MR1"
}
Edited May 17, 2018 by Paul Knopf
Assignee Loading
Time tracking Loading