label. Parent resolution gives parent_group_id precedence over parent_group_label; the parent must exist and have the same group type. A group with the same type and exact label is reused. The parent is assigned to both new and reused groups; omitting both parent fields clears an existing parent. Only a new group or a changed parent is saved. Success returns a single group in data.group_id, label, encoded parent_group_id, parent_group_label, created and changed. The parent label is read from the actual parent entity, not echoed from the request. Both parent fields are null for a root group. A missing or mismatched persisted parent reference is a server error (500), not a root group.label。parent_group_id 优先于 parent_group_label;父组必须存在且类型一致。相同类型、相同精确名称的组会复用。新建和复用组都会设置父级;省略两个父级参数会清除已有父级。仅新建或父级变化时保存。成功响应在 data 中返回一个分组。group_id、label、编码 parent_group_id、parent_group_label、created 和 changed。父组名称读取实际父实体,不回显请求参数。根组的两个父级字段均为 null。已保存父引用缺失或类型不符时返回服务端错误(500),不能作为正常根组处理。{
"code": 200,
"data": {
"group_id": "ENCODED_GROUP_ID",
"label": "Child group",
"parent_group_id": "ENCODED_PARENT_GROUP_ID",
"parent_group_label": "Parent group",
"created": 1791504000,
"changed": 1791504000
}
}{
"code": 200,
"data": {
"group_id": "ENCODED_GROUP_ID",
"label": "Child group",
"parent_group_id": null,
"parent_group_label": null,
"created": 1791504000,
"changed": 1791504000
}
}