Adding a Repository Member
Description
This API is used to add a repository member.
URI
POST /v1/repositories/{repository_uuid}/members
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repository_uuid |
Yes |
String |
Repository UUID returned by the CreateRepository API. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
users |
No |
Array of RepoMemberInfo objects |
Information list of added users |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_id |
No |
String |
Tenant ID Minimum length: 8 Maximum length: 32 |
|
domain_name |
No |
String |
Tenant name |
|
id |
Yes |
String |
ID of the added user Minimum length: 4 Maximum length: 32 |
|
name |
Yes |
String |
Added username |
|
role |
Yes |
Integer |
Permission of the added user. 20: Viewer. 30: Common member. 40: Administrator. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Response error |
|
result |
Array of CreateRepoMemberResult objects |
Response result |
|
status |
String |
Response status |
Request Examples
POST https://{endpoint}/v1/repositories/{repository_uuid}/members
{
"users" : [ {
"id" : "87b3dc2019f04ee788cb635eb26154ca",
"role" : 30,
"name" : "repo"
} ]
}
Response Examples
Status code: 200
Request succeeded
{
"result" : {
"id" : "87b3dc2019f04ee788cb635eb26154ca",
"name" : null,
"message" : "add user success",
"status" : "success"
},
"status" : "success"
}
Status Codes
|
Status Codes |
Description |
|---|---|
|
200 |
Request succeeded |
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