Adding a Repository Member
Function
This API is used to add a repository member.
URI
POST /v1/repositories/{repository_uuid}/members
Parameter | Mandatory | Type | Description |
|---|---|---|---|
repository_uuid | Yes | String | Explanation: Repository UUID returned by the CreateRepository API. Constraints: Mandatory Range: 32 digits and letters. Default value: None |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Explanation: 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. Constraints: Mandatory Range: None Default value: None |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
users | No | Array of RepoMemberInfo objects | Information list of added users. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
domain_id | No | String | Explanation: Tenant ID. Constraints: None Range: Minimum length: 8 Maximum length: 32 Default value: None |
domain_name | No | String | Explanation: Tenant name. Constraints: None Range: None Default value: None |
id | Yes | String | Explanation: ID of the added user. Constraints: Mandatory Range: Minimum length: 4 Maximum length: 32 Default value: None |
name | Yes | String | Explanation: Added username. Constraints: Mandatory Range: None Default value: None |
role | Yes | Integer | Explanation: User permissions. Constraints: Mandatory Range: 20: Viewer. 30: Common member. 40: Administrator. Default value: None |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
error | Error object | Response error. |
result | Array of CreateRepoMemberResult objects | Response result. |
status | String | Response status. |
Example Requests
POST https://{endpoint}/v1/repositories/{repository_uuid}/members
{
"users" : [ {
"id" : "87b3dc2019f04ee788cb635eb26154ca",
"role" : 30,
"name" : "repo"
} ]
} Example Responses
Status code: 200
OK
{
"result" : {
"id" : "87b3dc2019f04ee788cb635eb26154ca",
"name" : null,
"message" : "add user success",
"status" : "success"
},
"status" : "success"
} Status Codes
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.

