GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → postApiV4ProjectsIdRegistryProtectionRepositoryRules

AI-generated

Summary

Create a new repository rule to protect container registry access in a specified GitLab project by POSTing to the /api/v4/projects/{id}/registry/protection/repository/rules endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to add the repository protection rule to.
  • skipAuthentication — Whether to skip authentication; defaults to false.
  • parameterSchema (required) — The request parameters including the project ID in the path and the repository protection rule object in the request body.

Output shape

The operation returns the created repository protection rule object as JSON.

The method used is POST to the specified project registry protection repository rules endpoint. Authentication via gitlabApi credentials is required unless skipped.

Links

Discussion