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

Viewing Role Permissions of a Project

Function

View role permissions of a project.

Calling Method

For details, see Calling APIs.

URI

GET /devreposerver/v5/project-role/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

Array of ProjectRolePermissionDo objects

Definition:

Permission list.

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

View role permissions of a project.

https://{URL}/devreposerver/v5/project-role/permissions?project_id=f132b62084774001b84c294c0eef27f2

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "8b1520ec7d254fb5bae9e979e5926d17",
  "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
  }, {
    "id" : "001929184e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 3,
    "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" : false,
    "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
  }, {
    "id" : "001929ce4e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 4,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : true,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "00192a6c4e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 5,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : false,
    "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
  }, {
    "id" : "0019499b4e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 6,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : false,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : false,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "00194a384e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 7,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : false,
    "is_delete_restore_test_pkg" : false,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : false,
    "is_mkdir" : false,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "00194ab24e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 8,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : false,
    "is_delete_restore_test_pkg" : false,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : false,
    "is_mkdir" : false,
    "is_download" : false,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "00194b454e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 9,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "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" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "001f6c194e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 1001,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : true,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "00255ae14e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 1002,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : false,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : true,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "002bd43a4e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 1003,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : true,
    "is_delete_restore_test_pkg" : true,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : true,
    "is_mkdir" : true,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  }, {
    "id" : "0031d0114e4611f0b0b6fa163ead7b41",
    "region" : "xx-xxxxx-x",
    "roles" : null,
    "role_id" : 1004,
    "devuc_role_id" : null,
    "project_id" : "f132b62084774001b84c294c0eef27f2",
    "is_permission_config" : false,
    "is_change_pkg_status" : false,
    "is_upload" : false,
    "is_delete_restore_test_pkg" : false,
    "is_delete_restore_prod_pkg" : false,
    "is_edit_test_pkg" : false,
    "is_mkdir" : false,
    "is_download" : true,
    "is_restore_all" : false,
    "is_empty" : false,
    "create_time" : 1750472301000,
    "update_time" : 1750472301000,
    "migrated_630" : 0,
    "user_id" : null
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.