Updated on 2025-09-08 GMT+08:00

Querying Permissions of a Multi-Role User

Function

Query permissions of a multi-role user.

Calling Method

For details, see Calling APIs.

URI

GET /devreposerver/v5/user/permissions

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID, which uniquely identifies a CodeArts Req project. The value is the same as that of project_id in the URL https://{host}/cloudartifact/project/{project_id}/repository on the list page of self-hosted repos.

Constraints:

String length: 32 characters.

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

status

String

Definition:

Request status.

Value range:

success: The request is successful.

error: The request fails.

trace_id

String

Definition:

Request ID, which uniquely identifies the current request.

Value range:

A string of digits and hyphens (-).

result

ProjectRolePermissionDo object

Definition:

Permission information.

Value range:

N/A

Table 3 ProjectRolePermissionDo

Parameter

Type

Description

id

String

Definition:

ID.

Value range:

N/A

role_id

Integer

Definition:

Role ID.

Value range:

N/A

devuc_role_id

String

Definition:

ID of the DevUC role.

Value range:

N/A

project_id

String

Definition:

Project ID.

Value range:

N/A

is_permission_config

Boolean

Definition:

is_permission_config.

Value range:

N/A

is_change_pkg_status

Boolean

Definition:

is_change_pkg_status.

Value range:

N/A

is_upload

Boolean

Definition:

is_upload.

Value range:

N/A

is_delete_restore_test_pkg

Boolean

Definition:

is_delete_restore_test_pkg.

Value range:

N/A

is_delete_restore_prod_pkg

Boolean

Definition:

is_delete_restore_prod_pkg.

Value range:

N/A

is_edit_test_pkg

Boolean

Definition:

is_edit_test_pkg.

Value range:

N/A

is_mkdir

Boolean

Definition:

is_mkdir.

Value range:

N/A

is_download

Boolean

Definition:

is_download.

Value range:

N/A

is_restore_all

Boolean

Definition:

is_restore_all.

Value range:

N/A

is_empty

Boolean

Definition:

Whether the field can be left blank.

Value range:

N/A

create_time

Long

Definition:

Creation time.

Value range:

N/A

update_time

Long

Definition:

Update time.

Value range:

N/A

migrated_630

Integer

Definition:

migrated_630.

Value range:

N/A

region

String

Definition:

Region.

Value range:

N/A

user_id

String

Definition:

User ID.

Value range:

N/A

roles

String

Definition:

Role.

Value range:

N/A

Example Requests

Query permissions of a multi-role user.

https://{URL}/devreposerver/v5/user/permissions?project_id=f132b62084774001b84c294c0eef27f2

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "4933f7d81844450281d835f4ec7224d4",
  "result" : {
    "id" : "0019256f4e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : -1,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : true,
    "is_change_pkg_status" : true,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : true,
    "is_edit_test_pkg" : true,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : true,
    "is_empty" : true,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.