GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → postApiV4ProjectsIdMergeRequestsMergeRequestIidApprovals

AI-generated

Summary

Post an approval action to a specific merge request within a GitLab project, potentially altering approval status or requirements as defined by the API's approval endpoint.

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) number of the merge request within the project to approve.
  • postApiV4ProjectsIdMergeRequestsMergeRequestIidApprovals (required) — The request body parameters as defined by the GitLab API schema for the approval action, specifying approval details to apply.

Output shape

a JSON object representing the result of the approval operation as returned by the GitLab API, typically including updated approval status or related metadata.

The output strictly follows the GitLab 'postApiV4ProjectsIdMergeRequestsMergeRequestIidApprovals' response schema. Authentication is required unless skipped explicitly, and the base URL defaults to 'https://gitlab.com' but can be overridden.

Examples

Example 1: Approving a merge request

Set the project ID and merge request IID path parameters, provide the approval details in the request body, then execute the POST to submit an approval through the GitLab API.

Links

Discussion