---
title: "更新资产分组接口"
method: PUT
path: "/api/v1/cmdb/groupupdate"
tags: ["CMDB资产管理"]
---

# 更新资产分组接口

`PUT /api/v1/cmdb/groupupdate`

更新资产分组接口

## Request body

- ModelCmdbGroup
  - `children` ModelCmdbGroup[] — 子分组（虚拟字段，用于树形展示）
  - `createTime` UtilHTime
    - `time.Time` string
  - `hostCount` integer — 主机数量（虚拟字段，包含所有子分组的主机数量）
  - `hosts` ModelCmdbHost[] — 关联的主机列表
    - `billingType` string
    - `cpu` string
    - `createTime` UtilHTime
      - `time.Time` string
    - `disk` string
    - `expireTime` UtilHTime
      - `time.Time` string
    - `group` ModelCmdbGroup — recursive
    - `groupId` integer
    - `hostName` string
    - `id` integer
    - `instanceId` string
    - `memory` string
    - `name` string
    - `os` string
    - `privateIp` string
    - `publicIp` string
    - `region` string
    - `remark` string
    - `sshIp` string
    - `sshKeyId` integer
    - `sshName` string
    - `sshPort` integer
    - `status` integer
    - `updateTime` UtilHTime
      - `time.Time` string
    - `vendor` integer
  - `id` integer — 主键ID
  - `name` string — 分组名称
  - `parentId` integer — 父级分组ID（0 表示根分组）

## Response `200`

OK

- ResultResult
  - `code` integer — 状态码
  - `data` unknown
  - `message` string — 提示信息

---

[API](https://skmtc.net/opsre/apis/devops.md) · [All operations](https://skmtc.net/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
