GitLab API icon

GitLab API

Gitlab

Actions1062

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIidVersions

AI-generated

Summary

Retrieve a list of all versions of a specified merge request within a given 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 of the merge request whose versions are to be retrieved.
  • page — The page number of the results to retrieve, for pagination purposes. Defaults to 1.
  • per_page — The number of items to retrieve per page, controlling page size. Defaults to 20.
  • baseUrl — Base URL of the GitLab instance; defaults to https://gitlab.com.
  • skipAuthentication — Boolean to skip authentication if true; otherwise uses GitLab API credentials.

Output shape

a paginated list of version objects associated with the specified merge request

Supports pagination through 'page' and 'per_page' query parameters. Each version object represents a snapshot of the merge request at a particular revision. Requires authentication unless 'Skip Authentication' is set to true.

Examples

Example 1: Retrieve first page of versions for merge request IID 42 in project 'my-group/my-project', 10 items per page

Set 'id' to 'my-group/my-project', 'merge_request_iid' to 42, 'page' to 1, 'per_page' to 10.

Links

Discussion