Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Permission/ Updating the Code Group Permission Matrix Configurations
Updated on 2026-01-27 GMT+08:00

Updating the Code Group Permission Matrix Configurations

Function

This API is used to update the code group permission matrix configurations.

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

PUT https://{hostURL}/v4/groups/{group_id}/permissions/{resource_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

group_id

Yes

Integer

Definition

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

Default Value

N/A

Value range:

1~2147483647

resource_id

Yes

Integer

Definition

Resource ID, which is the ID in the data obtained from the API for obtaining the repository group permission resource point list.

Default Value

N/A

Value range:

1~2147483647

Request Parameters

Table 2 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 3 Request body parameters

Parameter

Mandatory

Type

Description

data

No

Array of UpdatePermissionDto objects

Definition:

Update resource permission details.

Value range:

N/A

Table 4 UpdatePermissionDto

Parameter

Mandatory

Type

Description

role_id

No

String

Definition:

Role ID

Value range:

N/A

role_name

No

String

Definition:

Role name

Value range:

N/A

permissions

No

Array of UpdatePermissionDetail objects

Definition:

Update permission point details

Value range:

N/A

Table 5 UpdatePermissionDetail

Parameter

Mandatory

Type

Description

permission_id

No

Integer

Definition:

Permission point ID

Value range:

N/A

Value range:

1~2147483647

enabled

No

Boolean

Definition:

Permission point status

Value range:

  • true: enabled

  • false: disabled

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

status

Integer

Response status code.

Value range:

0~1000

message

String

Returned information.

Example Requests

Update the code group permission matrix configurations.

PUT /v4/groups/{group_id}/permissions/{resource_id}

{
  "data" : [ {
    "role_id" : "099e44c3e71f47b9a8887c93351c8893",
    "role_name" : "Test manager",
    "permissions" : [ {
      "permission_id" : 2,
      "enabled" : true
    } ]
  } ]
}

Example Responses

Status code: 200

This API is used to update the code group permission matrix configurations.

{
  "status" : 200,
  "message" : ""
}

Status Codes

Status Code

Description

200

This API is used to update the code group permission matrix configurations.

Error Codes

See Error Codes.