Group security settings API
- Tier: Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Every API call to group security settings must be authenticated.
If a user isn’t a member of a private group, requests to the private group return a 404 Not Found
status code.
Update secret_push_protection_enabled
setting
Update the secret_push_protection_enabled
setting for the all projects in a group to the provided value.
Set to true
to enable secret push protection for the all projects in the group.
Prerequisites:
- You must have at least the Maintainer role for the group.
Attribute | Type | Required | Description |
---|---|---|---|
id | integer or string | yes | The ID or URL-encoded path of the group which the authenticated user is a member of |
secret_push_protection_enabled | boolean | yes | Whether secret push protection is enabled for the group. |
projects_to_exclude | array of integers | no | The IDs of projects to exclude from the feature. |
curl --header PUT "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/7/security_settings?secret_push_protection_enabled=true&projects_to_exclude=1,2,3"
Example response:
{
"secret_push_protection_enabled": true,
"errors": []
}
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support