Setting a Repository to Public or Private
Function
This API is used to set a repository to public or private.
URI
PUT /v2/repositories/{repository_uuid}/template-status
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repository_uuid |
Yes |
String |
Explanation: Repository UUID. For details, see the UUID returned by Querying the Details About a Repository. Constraints: N/A Range: 32 digits and letters. Default value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the corresponding Obtaining a User Token. The value of X-Subject-Token in the response header is the user token. Constraints: N/A Range: 1–100,000 characters. Default value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
template_type |
Yes |
String |
Explanation: Template type. Range:
|
|
code_title |
No |
String |
Explanation: Code template name. Range: N/A |
|
creator_name |
No |
String |
Explanation: Creator name. Range: N/A |
|
code_description |
No |
String |
Explanation: Code template description. Range: N/A |
|
languages |
No |
Array of strings |
Explanation: Template language. Range: N/A |
|
plateform |
No |
Array of strings |
Explanation: Template platform. Range: N/A |
|
entertype |
No |
Array of strings |
Explanation: Template tag. Range: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Explanation: Response error. Range: N/A |
|
result |
String |
Explanation: Response result. Range: N/A |
|
status |
String |
Explanation: Response status Range:
|
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 Code
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot