Obtaining Basic Settings of a Specified Repository Group
Function
This API is used to obtain basic settings of a specified repository group.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET https://{hostURL}/v4/groups/{group_id}/policies/general
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_id | Yes | Integer | Definition Repository group ID, which is the numeric ID next to Group ID on the repository group homepage. Value range: 1~2147483647 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. Range 1–100,000 characters. Default Value N/A. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| disable_fork | Boolean | Definition Whether to disable fork. |
| forbidden_developer_create_branch | Boolean | Definition Whether to forbid developers to create branches. |
| forbidden_developer_create_tag | Boolean | Definition Whether to forbid developers to create tags. |
| forbidden_committer_create_branch | Boolean | Definition Developers are not allowed to create tags. |
| branch_name_regex | String | Definition Regular expression of the branch name. Range 1–1,000 characters. |
| tag_name_regex | String | Definition Regular expression of the tag name. Range 1–1,000 characters. |
| generate_pre_merge_ref | Boolean | Definition Generate a merge request for pre-merging. |
| forbidden_gitlab_access | Boolean | Definition Whether to forbid repo access. |
| rebase_disable_trigger_webhook | Boolean | Definition Whether to forbid the MR rebase to trigger the webhook event. |
| open_gpg_verified | Boolean | Definition Whether to enable GPG public key authentication. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Example Requests
GET https://{endpoint}/v4/groups/{group_id}/policies/general Example Responses
Status code: 200
Obtain basic settings of a specified repository group.
{
"disable_fork" : false,
"forbidden_developer_create_branch" : false,
"forbidden_developer_create_tag" : false,
"forbidden_committer_create_branch" : null,
"branch_name_regex" : null,
"tag_name_regex" : null,
"generate_pre_merge_ref" : false,
"forbidden_gitlab_access" : null,
"rebase_disable_trigger_webhook" : null,
"open_gpg_verified" : null
} Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
} Status code: 403
Bad Request
{
"error_code" : "CH.004403",
"error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
} Status code: 404
Not Found
{
"error_code" : "CH.004404",
"error_msg" : "Group Not Found. Group Not Found"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Obtain basic settings of a specified repository group. |
| 401 | Unauthorized |
| 403 | Bad Request |
| 404 | Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.