更新时间:2026-01-08 GMT+08:00
设置仓库是公开状态还是私有状态
功能介绍
设置仓库是公开状态还是私有状态
URI
PUT /v2/repositories/{repository_uuid}/template-status
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| repository_uuid | 是 | String | 仓库id |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| template_type | 是 | String | 模板类型 |
| code_title | 否 | String | 代码模板名称 |
| creator_name | 否 | String | 创建者名称 |
| code_description | 否 | String | 代码模板描述 |
| languages | 否 | Array of strings | 模板语言 |
| plateform | 否 | Array of strings | 模板平台 |
| entertype | 否 | Array of strings | 模板类型 |
请求示例
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 |
错误码
请参见错误码。
父主题: Repository