文档首页> 代码托管 CodeArts Repo> API参考> API> Repository> 设置仓库是公开状态还是私有状态
更新时间:2023-04-07 GMT+08:00
分享

设置仓库是公开状态还是私有状态

功能介绍

设置仓库是公开状态还是私有状态

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

PUT /v2/repositories/{repository_uuid}/template-status

表1 路径参数

参数

是否必选

参数类型

描述

repository_uuid

String

仓库id

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

表3 请求Body参数

参数

是否必选

参数类型

描述

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

表4 响应Body参数

参数

参数类型

描述

error

Error object

响应错误

result

String

响应结果

status

String

响应状态

表5 Error

参数

参数类型

描述

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

错误码

请参见错误码

分享:

    相关文档

    相关产品