A AuthMS API Wiki API Reference iam.tianv.com →

PUT /admin/tenants/{id}/departments/{dept_id}

更新指定租户下某个部门的名称或层级信息

租户服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes 租户ID
dept_id path string Yes 部门ID

Request Body

Schema: dto.UpdateDepartmentRequest

FieldTypeRequiredExampleConstraintsDescription
code string No RD 部门编码
manager_id string No usr_001 负责人ID
name string No 产品研发部 部门名称
parent_id string No dept-root 父部门ID

Responses

StatusDescriptionSchema
200更新成功dto.DepartmentDetailResponse
400请求参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证gitee_com_linmes_authms_base_dto.SimpleResponse
403权限不足gitee_com_linmes_authms_base_dto.SimpleResponse
404资源未找到gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.DepartmentDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.DepartmentResponse No
message string No
timestamp string No

dto.DepartmentResponse

租户部门信息

FieldTypeRequiredExampleConstraintsDescription
code string No RD 部门编码
created_at string No 2026-01-15T10:30:00Z 创建时间
department_id string No dept_001 部门ID
manager_id string No usr_001 负责人ID
members_count integer No 25 成员数量
name string No 技术研发部 部门名称
parent_id string No dept_root 父部门ID
tenant_id string No tnt_abc123 租户ID

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No