Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ User/ Obtaining Permissions in the Repository Group List Specified by the Current User
Updated on 2026-01-27 GMT+08:00

Obtaining Permissions in the Repository Group List Specified by the Current User

Function

This API is used to obtain permissions of the repository group list specified by the current user.

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:group:getGroup

Read

-

-

-

-

URI

POST https://{hostURL}/v4/user/groups/group-permissions

Request Parameters

Table 1 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

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

[items]

Yes

Array of GroupPermissionsDto objects

Definition:

Repository group permission list

Table 3 GroupPermissionsDto

Parameter

Mandatory

Type

Description

project_id

No

String

Definition:

You can obtain the unique project identifier, 32-character UUID, by calling the API used to query the project list.

Value range:

32 characters

group_name

No

String

Definition:

Repository group name

Value range:

1–1,000 characters.

group_id

No

String

Definition:

Definition:

Repository group ID, which is the numeric ID next to Group ID on the repository group homepage.

Response Parameters

Status code: 201

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of UserGroupPermissionDto objects

Definition:

Repository group permission list

Table 5 UserGroupPermissionDto

Parameter

Type

Description

can_create_group

Boolean

Definition:

Whether a repository group can be created.

can_craete_project

Boolean

Definition:

Whether a repository can be created.

can_set_group

Boolean

Definition:

Whether a repository group can be set.

group_id

Integer

Definition:

Repository group ID

Value range:

1~2147483647

group_visibility

String

Definition:

Visibility. The value can be private or public.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

POST https://{endpoint}/v4/user/email-verify-code

[ {
  "group_id" : 2111927182
} ]

Example Responses

Status code: 201

OK

[ {
  "can_create_group" : true,
  "can_craete_project" : true,
  "can_set_group" : true,
  "group_id" : 2111927182,
  "group_visibility" : "private"
} ]

Status code: 401

Unauthorized

{
  "error_code" : "DEV.00000003",
  "error_msg" : "Authentication information expired."
}

Status Codes

Status Code

Description

201

OK

401

Unauthorized

Error Codes

See Error Codes.