GitLab API

GitlabTool

Actions1095

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIidRawDiffs

AI-generated

Summary

Retrieve the raw diff text of a specific merge request in a GitLab project.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the merge request.
  • merge_request_iid (required) — The internal ID (IID) of the merge request within the project.
  • skipAuthentication — Whether to skip authentication for this request; defaults to false.
  • baseUrl — Base URL of the GitLab instance (default: https://gitlab.com).
  • method — HTTP method to use, default is GET; other methods available but typical usage is GET.

Output shape

a raw text string containing the diffs of the specified merge request

Returns the raw diff output as text from the GitLab API endpoint /api/v4/projects/{id}/merge_requests/{merge_request_iid}/raw_diffs. Input parameters id and merge_request_iid must be provided. Authentication is used by default unless set to skip. No pagination or additional fields are involved.

Examples

Example 1: Retrieve the raw diffs for merge request IID 42 in project 'my-group/my-project'

Set parameter 'id' to 'my-group/my-project' and 'merge_request_iid' to '42', method defaults to GET, and ensure authentication is enabled.

Links

Discussion