> ## 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 Merge Requests

List merge requests.

<Note>
  External Documentation

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

## Parameters

<div className="integrations-table">
  | Parameter       | Description                                                                                                                                |
  | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
  | Assignee ID     | Returns merge requests assigned to the given user id. None returns unassigned merge requests. 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  | -                                                                                                                                          |
  | Deployed After  | Return merge requests deployed after the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                              |
  | Deployed Before | Return merge requests deployed before the given date/time. Expected in ISO 8601 format (2019-03-15T08:00:00Z).                             |
  | Environment     | Returns merge requests deployed to the given environment. 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.                                                                                        |
  | State           | Return all merge requests or just those that are opened, closed, locked, or merged.                                                        |
  | 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",
		"imported": false,
		"imported_from": "none",
		"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",
		"merge_after": "2018-09-07T11:16:00.000Z",
		"prepared_at": "2018-09-04T11: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": "main",
		"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": "my-group/my-project!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
		}
	}
]
```

## Workflow Library Example

[List Merge Requests with Gitlab and Send Results Via Email](https://library.blinkops.com/workflows/list-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-merge-requests-with-gitlab-and-send-results-via-email/canvas" />
</div>
