GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdPackagesProtectionRules

AI-generated

Summary

Retrieve package protection rules for a specified GitLab project by its ID or URL-encoded path.

Inputs

  • Id (required) — The ID or URL-encoded path of the project whose package protection rules you want to fetch.
  • Skip Authentication — Optionally skip using authentication for this request (default is false, meaning authentication is used).
  • baseUrl — Custom base URL of the GitLab instance (defaults to https://gitlab.com).
  • Method — HTTP method to use for the request; defaults to GET and other methods are available but GET is appropriate for retrieving protection rules.

Output shape

a JSON object representing the package protection rules configured for the specified project

The operation returns the protection rules data as defined by the GitLab API at the endpoint /api/v4/projects/{id}/packages/protection/rules. The 'id' path parameter is required. Authentication is used by default unless explicitly skipped. The results follow the API's response format for package protection rules.

Links

Discussion