Skip to content

Update a container registry protection tag rule

PATCH
/api/v4/projects/{id}/registry/protection/tag/rules/{protection_rule_id}

Updates a container registry protection tag rule for a project. This feature was introduced in GitLab 18.9.

id
required
One of:
string

The ID or URL-encoded path of the project.

protection_rule_id
required
integer

The ID of the container protection tag rule.

Media type application/json
object
tag_name_pattern

Container tag name pattern protected by the protection rule. For example, v*-release. Wildcard character * allowed.

string
nullable
minimum_access_level_for_push

Minimum GitLab access level required to push container tags. For example, Maintainer, Owner, or Admin. To unset the value, use an empty string ("").

string
nullable
Allowed values: maintainer owner admin ""
minimum_access_level_for_delete

Minimum GitLab access level required to delete container tags. For example, Maintainer, Owner, or Admin. To unset the value, use an empty string ("").

string
nullable
Allowed values: maintainer owner admin ""

OK

Media type application/json
object
id
integer format: int64
project_id
integer format: int64
tag_name_pattern
string
minimum_access_level_for_push
string
minimum_access_level_for_delete
string
Example
{
"id": 1,
"project_id": 123,
"tag_name_pattern": "v*-release",
"minimum_access_level_for_push": "maintainer",
"minimum_access_level_for_delete": "maintainer"
}

Bad Request

Unauthorized

Forbidden

Not Found

Unprocessable Entity