GitLab API icon

GitLab API

Gitlab

Actions1062

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIidDiffs

AI-generated

Summary

Retrieve the list of diffs for a specific merge request within a GitLab project using the GitLab API v4.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to which the merge request belongs.
  • merge_request_iid (required) — The internal ID of the merge request within the project to fetch diffs for.
  • page — The current page number for paginated results (optional).
  • per_page — The number of diff items to return per page (optional).
  • unidiff — Whether to return the diffs in Unified diff format (optional, boolean).
  • skipAuthentication — Whether to skip authentication for this request (optional, boolean).
  • method — HTTP method to use for the request; defaults to GET.
  • baseUrl — The base URL of the GitLab instance; defaults to 'https://gitlab.com'.

Output shape

a JSON array of merge request diffs

The response contains the paginated list of diffs for the specified merge request. Pagination can be controlled using 'page' and 'per_page' query parameters. Authentication is required unless explicitly skipped.

Examples

Example 1: Fetch diffs for a merge request

Set 'id' to the project ID, 'merge_request_iid' to the merge request internal ID, and optionally specify 'page' and 'per_page'.

Links

Discussion