Add repository members
Function
Add a warehouse member.
URI
POST /v1/repositories/{repository_uuid}/members
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_uuid |
Yes |
String |
Repository UUID, which is returned by the CreateRepository API. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies a 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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
users |
No |
Array of RepoMemberInfo objects |
List of user information to be added. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
No |
String |
Tenant ID of a user. Minimum: 8 Maximum: 32 |
domain_name |
No |
String |
Tenant name of the user |
id |
Yes |
String |
ID of the user to be added. Minimum: 4 Maximum: 32 |
name |
Yes |
String |
Name of the user to be added |
role |
Yes |
Integer |
Permission of the user to be added. The options are as follows: 30->common member, 40->administrator |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
Array of CreateRepoMemberResult objects |
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.