Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Group/ Obtaining Basic Settings of a Specified Repository Group
Updated on 2026-01-27 GMT+08:00

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.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:group:getGroup

Read

-

-

-

-

URI

GET https://{hostURL}/v4/groups/{group_id}/general-policy

Table 1 Path Parameters

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.

Default Value

N/A

Value range:

1~2147483647

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

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

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

GET https://{endpoint}/v4/groups/{group_id}/general-policy

Example Responses

Status code: 200

Obtain the 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" : "Project Not Found. Project Not Found"
}

Status Codes

Status Code

Description

200

Obtain the basic settings of a specified repository group.

401

Unauthorized

403

Bad Request

404

Not Found

Error Codes

See Error Codes.