Help Center/ CodeArts Repo/ API Reference/ APIs/ Repository/ Sets whether a repository is in public or private state.
Updated on 2023-09-12 GMT+08:00

Sets whether a repository is in public or private state.

Function

Sets whether a repository is in public or private state.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repository_uuid

Yes

String

Specifies the repository ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

template_type

Yes

String

Template Type

code_title

No

String

Code Template Name

creator_name

No

String

Name of the creator

code_description

No

String

Code Template Description

languages

No

Array of strings

Language

plateform

No

Array of strings

Template Platform

entertype

No

Array of strings

Template Type

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

result

String

Result

status

String

Status code in a response

Table 5 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Example Requests

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']
}

Example Responses

Status code: 200

OK

{
  "result" : null,
  "error" : null,
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.