GitLab API icon

GitLab API

Gitlab

Actions1062

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIidVersionsVersionId

AI-generated

Summary

Retrieve a specific version of the diff for a merge request in a GitLab project by providing the project ID or path, merge request internal ID, and diff version ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • merge_request_iid (required) — The internal ID of the merge request.
  • version_id (required) — The ID of the merge request diff version to retrieve.
  • unidiff — Optional query parameter to specify whether to return the diff in Unified diff format.

Output shape

A single merge request diff version record as returned by the GitLab API, including diff details and metadata.

The operation performs a GET request and returns the diff version data with no pagination. The response format depends on the optional 'unidiff' query parameter if provided.

Links

Discussion