GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsIdPackagesProtectionRules

AI-generated

Summary

Create a new package protection rule for a specific GitLab project by sending a POST request to the project's packages protection rules endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project for which to create the package protection rule.

Output shape

a single JSON object representing the newly created package protection rule

The output matches the response from the GitLab API's endpoint POST /api/v4/projects/{id}/packages/protection/rules. Requires authentication unless 'Skip Authentication' is enabled. The request body must conform to the defined schema for package protection rules.

Links

Discussion