Okapi Okapi

GitLab API POST /api/v4/projects/{id}/merge_requests/{id}/approvals endpoint removal

Stopped workingSubscribe to GitLab APIShare

On May 22, 2023, the GitLab API removed the POST /api/v4/projects/{id}/merge_requests/{id}/approvals endpoint. Calls made to this endpoint fail. The endpoint was previously used to change the approvals required for a merge request.


Calls it hits

  • POST /api/v4/projects/{id}/merge_requests/{id}/approvals

What to use instead of these calls

Create or update merge request approval rules using /api/v4/projects/{id}/merge_requests/{iid}/approval_rules instead.

In GitLab API's words

To change the approvals required for a merge request, you should no longer use the `/approvals` API endpoint, which was deprecated in GitLab 14.0.

GitLab API, Announcement

Facts

API
GitLab API gitlab.com
Kind
Endpoint removal
Announced
June 22, 2021
Takes effect
May 22, 2023
Calls after that day
Fail
Source
Announcement
Last updated
Verified
, against GitLab API's own pages

Questions

When does this change take effect?

Calls to POST /api/v4/projects/{id}/merge_requests/{id}/approvals on GitLab API stopped working on May 22, 2023.

What happens to calls after May 22, 2023?

They have failed since May 22, 2023.

How do I find the calls this hits in my code?

Okapi reads your repository, finds the calls this change hits and opens a pull request with the fix. It never commits to your branches: every change comes as a pull request you review.


More from GitLab API 10

  1. /api/v4/projects/{id}/managed_licenses*Endpoint removal Stopped working
  2. GET /api/v4/groups/{id}/dora/metricsParameter removal Stopped working
  3. GET /api/v4/projects/{id}/dora/metricsParameter removal Stopped working
  4. POST /api/v4/ci/lintEndpoint removal Stopped working
  5. No date GET /api/v4/namespaces/:namespace_id/subscription_add_on_purchase/:idEndpoint removal Deprecated, no date
  6. No date GET /api/v4/projects/{id}/merge_requests/{id}/changesEndpoint removal Deprecated, no date
  7. No date PATCH /api/v4/namespaces/:previous_namespace_id/minutes/move/:target_namespace_idEndpoint removal Deprecated, no date
  8. No date POST /api/v4/namespaces/:id/gitlab_subscriptionEndpoint removal Deprecated, no date
  9. No date POST /api/v4/namespaces/:namespace_id/minutesEndpoint removal Deprecated, no date
  10. No date POST /api/v4/namespaces/:namespace_id/subscription_add_on_purchase/:idEndpoint removal Deprecated, no date

You fixed this one by hand.

Okapi opens the pull request with the fix before the next breaking change reaches your code.

Add to GitHub

Get notifications

Subscribe to GitLab API

Hear about each breaking change GitLab API announces, in your feed reader, calendar or Slack.

1What to follow

Provider
  • GitLab API

2Where to get it

/breaking-changes/feed.xml

Paste it into Feedly, Inoreader, NetNewsWire or any reader. New changes show up as they're announced.