Updated on 2026-01-08 GMT+08:00

Adding a Repository Member

Description

This API is used to add a repository member.

URI

POST /v1/repositories/{repository_uuid}/members

Table 1 Path parameters

Parameter

Mandatory

Type

Description

repository_uuid

Yes

String

Repository UUID returned by the CreateRepository API.

Request Parameters

Table 2 Request header 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

users

No

Array of RepoMemberInfo objects

Information list of added users

Table 4 RepoMemberInfo

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

Table 5 Response body parameters

Parameter

Type

Description

error

Error object

Response error

result

Array of CreateRepoMemberResult objects

Response result

status

String

Response status

Table 6 Error

Parameter

Type

Description

code

String

Error codes

message

String

Error message

Table 7 CreateRepoMemberResult

Parameter

Type

Description

id

String

User ID

Minimum length: 32

Maximum length: 32

message

String

Information of the added repository member

name

String

Username

status

String

Status of the added repository member

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.