设置仓库是公开状态还是私有状态-j9九游会登录
功能介绍
设置仓库是公开状态还是私有状态
调试
您可以在中调试该接口,支持自动认证鉴权。api explorer可以自动生成sdk代码示例,并提供sdk代码示例调试功能。
uri
put /v2/repositories/{repository_uuid}/template-status
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
repository_uuid |
是 |
string |
仓库id |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
x-auth-token |
是 |
string |
参数解释: 用户token。通过调用iam服务获取用户token接口获取(响应消息头中x-subject-token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
template_type |
是 |
string |
模板类型 |
|
code_title |
否 |
string |
代码模板名称 |
|
creator_name |
否 |
string |
创建者名称 |
|
code_description |
否 |
string |
代码模板描述 |
|
languages |
否 |
array of strings |
模板语言 |
|
plateform |
否 |
array of strings |
模板平台 |
|
entertype |
否 |
array of strings |
模板类型 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error |
error object |
响应错误 |
|
result |
string |
响应结果 |
|
status |
string |
响应状态 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
code |
string |
错误码 |
|
message |
string |
错误信息 |
请求示例
put https://{endpoint}/v2/repositories/{repository_uuid}/template-status
{
"template_type": "share",
"code_title": "exampletitle",
"creator_name": "examplename",
"code_description": "exampledescription",
"languages": ['java'],
"plateform": ['console'],
"entertype": ['ai']
}
响应示例
状态码: 200
ok
{
"result" : null,
"error" : null,
"status" : "success"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
ok |
错误码
请参见错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨