GitLab API

GitlabTool

Actions1095

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIid

AI-generated

Summary

Retrieve detailed information about a specific merge request within a GitLab project by providing the project ID and the internal merge request ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the merge request.
  • merge_request_iid (required) — The internal ID of the specific merge request to retrieve.
  • render_html — If set to true, the response includes rendered HTML for the merge request's title and description.
  • include_diverged_commits_count — If true, includes the count of commits the merge request branch is behind the target branch.
  • include_rebase_in_progress — If true, indicates whether a rebase operation is currently in progress for this merge request.

Output shape

a single JSON object representing the detailed merge request data as returned by the GitLab API v4 endpoint

The operation performs a GET request to the path /api/v4/projects/{id}/merge_requests/{merge_request_iid}. Query parameters are optional and influence additional fields included in the response. The response includes full merge request details including metadata, status, and optionally rendered HTML descriptions and rebase status.

Examples

Example 1: Fetch merge request info with rendered HTML descriptions

Set id to the GitLab project ID, merge_request_iid to the target merge request's internal ID, and render_html to true to include formatted title and description.

Links

Discussion