POST Update Role endpoint.
Endpoint
POST
/web/v1/system/roles/update WEBAuthentication
- Chain: WEB
- JWT Token: true
- API Key: false
- Permissions: ["workspace:role:write"]
- MFA Required: workspace:role:update
Rate Limit
Standard rate limit applies.
Headers
Frontend Headers
| Header | Required | Description |
|---|---|---|
| X-LOCALE | Yes | 用户的 locale |
| Accept-Language | No | 语言偏好 |
Cloudflare Headers
| Header | Required | Description |
|---|---|---|
| CF-Connecting-IP | Yes | Client IP from Cloudflare |
| CF-IPCountry | Yes | Client country code |
| CF-Ray | Yes | Cloudflare Ray ID |
| CF-Visitor | Yes | Visitor scheme |
| CF-Worker | No | Cloudflare Worker indicator |
| CF-TCP-Port | No | Client TCP port |
| CF-Edge-Keep-Alive | No | Edge keep-alive status |
| CF-Cache-Status | No | Cache status |
| CDN-Loop | No | CDN loop detection |
| X-Real-IP | Yes | Real client IP |
Nginx Headers
| Header | Required | Description |
|---|---|---|
| X-PORTAL-ACCESS-CODE | Yes | Portal access code |
| X-Real-IP | Yes | 客户端真实 IP |
| X-Forwarded-For | Yes | 代理链 |
| X-Forwarded-Proto | Yes | 协议 |
Request Parameters
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| roleId | String | Yes | 角色业务ID |
| roleName | String | No | 角色名称 |
| description | String | No | 角色描述 |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| data.bizId | String | 业务 ID |
| data.workspaceBizId | String | 工作空间业务 ID |
| data.roleName | String | 角色名称 |
| data.roleType | WorkspaceRoleType | 角色类型 |
| data.description | String | 描述 |
| data.permissionCodes | List<String> | 权限代码列表 |
| data.createdAt | Instant | 创建时间 |
| data.updatedAt | Instant | 更新时间 |