Update approval rule
Private API subject to change
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body
Section titled “ Request Body ”object
The name of the approval rule
The number of required approvals for this rule
Deprecated: The user ids for this rule
The user ids for this rule
Deprecated: The group ids for this rule
The group ids for this rule
The usernames for this rule
The protected branch ids for this rule
Apply this rule to all protected branches within the project
Whether hidden groups should be removed
Minimum code coverage threshold (0-100). If coverage falls below this threshold, approval is required.
The number of vulnerabilities allowed for this rule
The security scanners to be considered by the approval rule
The security levels to be considered by the approval rule
The vulnerability states to be considered by the approval rule
Example generated
{ "name": "example", "approvals_required": 1, "users": [ 1 ], "user_ids": [ 1 ], "groups": [ 1 ], "group_ids": [ 1 ], "usernames": [ "example" ], "protected_branch_ids": [ 1 ], "applies_to_all_protected_branches": true, "remove_hidden_groups": true, "coverage_minimum_threshold": 1, "vulnerabilities_allowed": 1, "scanners": [ "example" ], "severity_levels": [ "example" ], "vulnerability_states": [ "example" ]}Responses
Section titled “ Responses ”OK
object
object
object
object
object
object
CI artifacts size in bytes.
Container registry size in bytes.
Indicates whether the deduplicated container registry size for the namespace is an estimated value or not.
Dependency Proxy sizes in bytes.
LFS objects size in bytes.
Packages size in bytes.
CI pipeline artifacts size in bytes.
Git repository size in bytes.
Snippets size in bytes.
Total storage in bytes.
Uploads size in bytes.
Wiki size in bytes.
object
object
[Experimental] Indicates whether GitLab Duo Core features are enabled for the group
object
object
object
object
object
object
Example
{ "id": 1, "name": "QA", "rule_type": "regular", "approvals_required": 2, "users": [ { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" } ], "groups": [ { "web_url": "http://gitlab.example.com/groups/diaspora", "name": "Diaspora", "custom_attributes": { "key": "foo", "value": "bar" }, "ldap_group_links": { "cn": "ldap-group-1", "group_access": 10, "provider": "ldapmain", "filter": "id >= 500", "member_role_id": 12 }, "saml_group_links": { "name": "saml-group-1", "access_level": 40, "member_role_id": 12, "provider": "saml" } } ], "protected_branches": { "id": 1, "name": "main", "push_access_levels": [ { "id": 1, "access_level": 40, "access_level_description": "Maintainers", "deploy_key_id": 1, "user_id": 1, "group_id": 1, "member_role_id": 42, "member_role_name": "Lead Developer" } ], "merge_access_levels": [ { "id": 1, "access_level": 40, "access_level_description": "Maintainers", "deploy_key_id": 1, "user_id": 1, "group_id": 1, "member_role_id": 42, "member_role_name": "Lead Developer" } ], "unprotect_access_levels": [ { "id": 1, "access_level": 40, "access_level_description": "Maintainers", "deploy_key_id": 1, "user_id": 1, "group_id": 1, "member_role_id": 42, "member_role_name": "Lead Developer" } ] }, "coverage_minimum_threshold": 80, "approvers": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }}Bad Request
Not Found