获取代码组继承设置项
功能介绍
获取代码组继承设置项
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v4/groups/{group_id}/inherit-setting
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
group_id |
是 |
Integer |
参数解释: 代码组id,代码组首页,Group ID后的数字Id 取值范围: 1-2147483647 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
[数组元素] |
Array of ProjectSettingsInheritCfgDto objects |
代码组继承设置 |
参数 |
参数类型 |
描述 |
---|---|---|
name |
String |
参数解释: 设置源类型。 约束限制: 不涉及。 取值范围:
默认取值: 不涉及。 枚举值:
|
inherit_mod |
String |
参数解释: 继承设置。 约束限制: 不涉及。 取值范围:
默认取值: 不涉及。 枚举值:
|
状态码:401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
参数解释: 错误码。 |
error_msg |
String |
参数解释: 错误信息。 |
状态码:403
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
参数解释: 错误码。 |
error_msg |
String |
参数解释: 错误信息。 |
状态码:404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
参数解释: 错误码。 |
error_msg |
String |
参数解释: 错误信息。 |
请求示例
GET https://{endpoint}/v4/groups/{group_id}/inherit-setting
响应示例
状态码: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" } ]
状态码:401
Unauthorized
{ "error_code" : "DEV.00000003", "error_msg" : "认证信息过期" }
状态码:403
Bad Request
{ "error_code" : "CH.004403", "error_msg" : "您没有操作权限,请升级权限后重试。" }
状态码:404
Not Found
{ "error_code" : "CH.004404", "error_msg" : "Group Not Found。Group Not Found" }
状态码
状态码 |
描述 |
---|---|
200 |
Get Group Inheritance Settings |
401 |
Unauthorized |
403 |
Bad Request |
404 |
Not Found |
错误码
请参见错误码。