GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → deleteApiV4ProjectsIdPackagesProtectionRulesPackageProtectionRuleId

AI-generated

Summary

Delete a specific package protection rule from a GitLab project by specifying the project ID or URL-encoded path and the package protection rule ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project from which to delete the package protection rule.
  • package_protection_rule_id (required) — The ID of the package protection rule to delete from the specified project.
  • baseUrl — (Optional) The base URL of the GitLab instance, defaulting to 'https://gitlab.com'.
  • skipAuthentication — Option to skip authentication (default false).

Output shape

no body — success/failure status only

This operation sends a DELETE request to the GitLab API endpoint /api/v4/projects/{id}/packages/protection/rules/{package_protection_rule_id}. On success, the response typically does not contain a body, indicating the rule was deleted. The relevant status code should be checked to confirm success.

Examples

Example 1: Delete package protection rule with ID 123 from project 'my-group/my-project'

Set 'id' to 'my-group/my-project' and 'package_protection_rule_id' to '123'. Use default 'baseUrl' unless connecting to a self-hosted GitLab instance.

Links

Discussion