> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Project Merge Requests

List project merge requests.

<Note>
  External Documentation

  To learn more, visit the [GitLab documentation](https://docs.gitlab.com/ee/api/merge_requests.html#list-project-merge-requests).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
  | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | IIDs       | A comma-separated list of the merge requests IIDs to return.<br /><br />An IID is a unique ID only in scope of a single project. When you browse issues or merge requests with the web UI, you see the IID.<br />For more information about the differences between IID and ID, visit the [GitLab API Documentation page](https://gitlab.com/gitlab-org/gitlab/-/blob/1cb9fe25/doc/api/README.md#id-vs-iid). |
  | Project ID | The ID or path of the project owned by the authenticated user. If the path is being used, it should be url encoded - for example: user%2my-project .                                                                                                                                                                                                                                                         |
  | State      | Return all merge requests or just those that are opened, closed, locked, or merged.                                                                                                                                                                                                                                                                                                                          |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                                     |
  | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
  | Assignee ID    | Returns merge requests assigned to the given user ID. None returns unassigned merge requests.<br />Any returns merge requests with an assignee. |
  | Created After  | Return merge requests created on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                                   |
  | Created Before | Return merge requests created on, or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                                 |
  | Order By       | Return requests ordered by `created_at` or `updated_at` fields. Default is `created_at`.                                                        |
  | Search         | Search merge requests against their title and description.                                                                                      |
  | Sort           | Return requests sorted in asc or desc order. Default is desc.                                                                                   |
  | Source Branch  | Return merge requests with the given source branch.                                                                                             |
  | Target Branch  | Return merge requests with the given target branch.                                                                                             |
  | Updated After  | Return merge requests updated on or after the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                                   |
  | Updated Before | Return merge requests updated on or before the given time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                                  |
</div>

## Example Output

```json theme={"dark"}
[
  {
    "id": 1,
    "iid": 1,
    "project_id": 3,
    "title": "test1",
    "description": "fixed login page css paddings",
    "state": "merged",
    "merged_by": { // Deprecated and will be removed in API v5, use `merge_user` instead
      "id": 87854,
      "name": "Douwe Maan",
      "username": "DouweM",
      "state": "active",
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
      "web_url": "https://gitlab.com/DouweM"
    },
    "merge_user": {
      "id": 87854,
      "name": "Douwe Maan",
      "username": "DouweM",
      "state": "active",
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
      "web_url": "https://gitlab.com/DouweM"
    },
    "merged_at": "2018-09-07T11:16:17.520Z",
    "closed_by": null,
    "closed_at": null,
    "created_at": "2017-04-29T08:46:00Z",
    "updated_at": "2017-04-29T08:46:00Z",
    "target_branch": "master",
    "source_branch": "test1",
    "upvotes": 0,
    "downvotes": 0,
    "author": {
      "id": 1,
      "name": "Administrator",
      "username": "admin",
      "state": "active",
      "avatar_url": null,
      "web_url" : "https://gitlab.example.com/admin"
    },
    "assignee": {
      "id": 1,
      "name": "Administrator",
      "username": "admin",
      "state": "active",
      "avatar_url": null,
      "web_url" : "https://gitlab.example.com/admin"
    },
    "assignees": [{
      "name": "Miss Monserrate Beier",
      "username": "axel.block",
      "id": 12,
      "state": "active",
      "avatar_url": "http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon",
      "web_url": "https://gitlab.example.com/axel.block"
    }],
    "reviewers": [{
      "id": 2,
      "name": "Sam Bauch",
      "username": "kenyatta_oconnell",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/956c92487c6f6f7616b536927e22c9a0?s=80&d=identicon",
      "web_url": "http://gitlab.example.com//kenyatta_oconnell"
    }],
    "source_project_id": 2,
    "target_project_id": 3,
    "labels": [
      "Community contribution",
      "Manage"
    ],
    "draft": false,
    "work_in_progress": false,
    "milestone": {
      "id": 5,
      "iid": 1,
      "project_id": 3,
      "title": "v2.0",
      "description": "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
      "state": "closed",
      "created_at": "2015-02-02T19:49:26.013Z",
      "updated_at": "2015-02-02T19:49:26.013Z",
      "due_date": "2018-09-22",
      "start_date": "2018-08-08",
      "web_url": "https://gitlab.example.com/my-group/my-project/milestones/1"
    },
    "merge_when_pipeline_succeeds": true,
    "merge_status": "can_be_merged",
    "detailed_merge_status": "not_open",
    "sha": "8888888888888888888888888888888888888888",
    "merge_commit_sha": null,
    "squash_commit_sha": null,
    "user_notes_count": 1,
    "discussion_locked": null,
    "should_remove_source_branch": true,
    "force_remove_source_branch": false,
    "allow_collaboration": false,
    "allow_maintainer_to_push": false,
    "web_url": "http://gitlab.example.com/my-group/my-project/merge_requests/1",
    "references": {
      "short": "!1",
      "relative": "!1",
      "full": "my-group/my-project!1"
    },
    "time_stats": {
      "time_estimate": 0,
      "total_time_spent": 0,
      "human_time_estimate": null,
      "human_total_time_spent": null
    },
    "squash": false,
    "task_completion_status":{
      "count":0,
      "completed_count":0
    },
    "has_conflicts": false,
    "blocking_discussions_resolved": true
  }
]
```

## Workflow Library Example

[List Project Merge Requests with Gitlab and Send Results Via Email](https://library.blinkops.com/workflows/list-project-merge-requests-with-gitlab-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-project-merge-requests-with-gitlab-and-send-results-via-email/canvas" />
</div>
