Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Group/ Obtaining the Inheritance Configuration Items of a Repository Group
Updated on 2026-04-28 GMT+08:00

Obtaining the Inheritance Configuration Items of a Repository Group

Function

This API is used to obtain the inheritance configuration items of a 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}/inherit-setting

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.

Value range:

1~2147483647

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

[items]

Array of ProjectSettingsInheritCfgDto objects

Repository group inheritance settings

Table 4 ProjectSettingsInheritCfgDto

Parameter

Type

Description

name

String

Definition:

Source type

Constraints:

N/A

Value range:

  • protected_branches: Protected branch settings

  • protected_tags: Protected tag settings

  • repository_settings: Repository settings

  • push_rules: Commit rule settings

  • merge_requests: Merge request settings

  • e2e_settings: E2E settings

  • watermark: Watermark settings

  • webhook_settings: Webhook settings

  • mr_branch_policies: Merge branch policy settings

  • reviews: review settings

  • deploy_keys: deployment parameter settings

Default value:

N/A

Enumeration values:

  • protected_branches

  • protected_tags

  • repository_settings

  • push_rules

  • merge_requests

  • e2e_settings

  • watermark

  • webhook_settings

  • mr_branch_policies

  • reviews

  • deploy_keys

inherit_mod

String

Definition:

Inheritance settings

Constraints:

N/A

Value range:

  • force_inherit: force inherit configuration

  • custom: use current configuration

Default value:

N/A

Enumeration values:

  • force_inherit

  • custom

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 404

Table 7 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}/inherit-setting

Example Responses

Status code: 200

Get Group Inheritance Settings

[ {
  "name" : "protected_branches",
  "inherit_mod" : "custom"
}, {
  "name" : "protected_tags",
  "inherit_mod" : "custom"
}, {
  "name" : "repository_settings",
  "inherit_mod" : "inherit"
}, {
  "name" : "push_rules",
  "inherit_mod" : "inherit"
}, {
  "name" : "merge_requests",
  "inherit_mod" : "inherit"
}, {
  "name" : "e2e_settings",
  "inherit_mod" : "inherit"
}, {
  "name" : "watermark",
  "inherit_mod" : "inherit"
}, {
  "name" : "webhook_settings",
  "inherit_mod" : "inherit"
}, {
  "name" : "mr_branch_policies",
  "inherit_mod" : "inherit"
}, {
  "name" : "reviews",
  "inherit_mod" : "inherit"
}, {
  "name" : "deploy_keys",
  "inherit_mod" : "inherit"
} ]

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

Get Group Inheritance Settings

401

Unauthorized

403

Bad Request

404

Not Found

Error Codes

See Error Codes.