Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Member/ Obtaining the Repository Member List
Updated on 2026-01-27 GMT+08:00

Obtaining the Repository Member List

Function

This API is used to obtain repository members.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:repository:getMembers

Read

-

-

-

-

URI

GET https://{hostURL}/v4/repositories/{repository_id}/members

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repository_id

Yes

Integer

Definition

You can query the project list to obtain the repository ID by calling the API used to query user's all repositories.

Constraints

N/A

Default Value

N/A

Value range:

1~2147483647

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

search

No

String

Definition

Query keyword for fuzzy match, such as username, user alias, and tenant name.

offset

No

Integer

Definition

Offset, which starts from 0.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Definition

Number of returned records.

Value range:

1~100

Default value:

20

permission

No

String

Definition

Permission point.

Constraints

  • repository: indicates a repository.

  • code: indicates code.

  • member: indicates member.

  • branch: indicates branch.

  • tag: indicates tag.

  • mr: indicates MR.

  • label: indicates label.

Enumeration values:

  • repository

  • code

  • member

  • branch

  • tag

  • mr

  • label

action

No

String

Definition

Permission action point. Different permission points have different actions.

Constraints

  • repository:create,fork,delete,setting

  • code:push,download

  • member:create,update,delete

  • branch:create,delete

  • tag:create,delete

  • mr:create,update,comment,review,approve,merge,close,reopen

  • label:create,delete,update

Enumeration values:

  • repository:create,fork,delete,setting

  • code:push,download

  • member:create,update,delete

  • branch:create,delete

  • tag:create,delete

  • mr:create,update,comment,review,approve,merge,close,reopen

  • label:create,delete,update

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Total

String

Total number of results of the current request.

Table 5 Response body parameters

Parameter

Type

Description

[items]

Array of RepositoryMemberDto objects

Repository member details

Table 6 RepositoryMemberDto

Parameter

Type

Description

user_id

Integer

User ID

user_iam_id

String

IAM user ID.

user_name

String

Username

user_nick_name

String

User alias

tenant_name

String

Tenant name

tenant_id

String

Tenant ID

is_repo_creator

Integer

Repository owner or not

Value range:

0~1

is_group_creator

Integer

Parent repository group owner or not

Value range:

0~1

is_Project_admin

Integer

Project administrator or not

Value range:

0~1

project_role_name

String

Project role name

repository_role_name

String

Repository role name

repository_role_Id

String

Repository role ID

member_source

String

Name of the member group from which members come

member_group_source

String

Name of the upper-level repository group from which members come

member_source_id

String

Member source ID, which can be a repository group ID or member group ID

service_license_status

Integer

Member service-level permission status. 1: in use; 0: disabled

Value range:

0~1

action_enabled

Boolean

Whether the member has the corresponding permission. true: yes; false: no

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

None

Example Responses

Status code: 200

Query the repository member list.

[ {
  "id" : "5765703695634b32a2ad0016d8938281",
  "user_id" : 10323,
  "user_iam_id" : "9ce763c569e54df38804944fe597ba72",
  "user_name" : "test_name",
  "user_nick_name" : "test",
  "tenant_name" : "tenant_example",
  "tenant_id" : "159b65b41ead484d8ddff250a4731781",
  "is_repo_creator" : 1,
  "is_group_creator" : 0,
  "is_Project_admin" : 1,
  "project_role_name" : "Developer",
  "repository_role_name" : "Developer",
  "repository_role_Id" : "4a6a226613c84c1199413983a63acf77",
  "member_source" : "user group name",
  "member_group_source" : "group name",
  "member_source_id" : 2111842051,
  "service_license_status" : 1,
  "action_enabled" : true
} ]

Status code: 401

Unauthorized

{
  "error_code" : "CH.00000001",
  "error_msg" : "User authentication info not found."
}

Status code: 403

Bad Request

{
  "error_code" : "CH.00401008",
  "error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
}

Status code: 404

Not Found

{
  "error_code" : "CH.00402000",
  "error_msg" : "The repository does not exist. Check and try again."
}

Status Codes

Status Code

Description

200

Query the repository member list.

401

Unauthorized

403

Bad Request

404

Not Found

Error Codes

See Error Codes.