查看仓库继承设置
功能介绍
查看仓库继承设置
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v4/repositories/{repository_id}/inherit-setting
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
repository_id |
是 |
Integer |
参数解释: 仓库的ID,通过查询用户所有仓库接口查询项目列表获取。 约束限制: 不涉及。 取值范围: 1-2147483647 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
[数组元素] |
Array of RepositoryInheritSettingDto objects |
仓库继承设置列表 |
参数 |
参数类型 |
描述 |
---|---|---|
name |
String |
参数解释: 设置源类型。 取值范围:
枚举值:
|
inherit_mod |
String |
参数解释: 继承设置。 取值范围:
枚举值:
|
请求示例
无
响应示例
状态码:200
仓库继承设置列表
[ { "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" } ]
状态码
状态码 |
描述 |
---|---|
200 |
仓库继承设置列表 |
错误码
请参见错误码。