Update Asset
hudu_update_assetUpdate an existing Hudu asset by replacing supplied fields. Requires the owning company ID and asset ID; each provided value overwrites the stored one, so fetch the asset first to avoid data loss.
Instructions
Update an existing asset. An asset is any documented thing that belongs to a company — a server, a workstation, a firewall, a licence, a contact. The asset layout it was created from decides which custom fields it carries.
Assets are read globally but written per company. This tool needs the owning company id as well as the asset id, because Hudu exposes no /assets/{id} route. If you found the asset with hudu_list_assets, take company_id straight from that record; if all you have is an asset id, call hudu_list_assets with id set to it and read company_id off the result.
Only the arguments you supply are sent, but each one replaces the stored value outright — this is a PUT, not a merge. Read the asset with hudu_get_asset first whenever you intend to add to a field rather than overwrite it. The same applies to custom_fields: send the full label/value set you want the asset to end up with.
Operation class: Update. Impact: Overwrites the supplied fields on this asset with the values given.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric id of the asset, as returned by hudu_list_assets or hudu_list_company_assets. | |
| name | No | Display name of the asset, e.g. a hostname. | |
| company_id | Yes | Numeric id of the company that owns this asset. Not optional and not guessable — an asset id belonging to company A returns 404 under company B, indistinguishable from a deleted asset. | |
| primary_mail | No | Primary email address associated with the asset. | |
| custom_fields | No | Values for the custom fields the asset layout defines, as an array holding one object that maps field label to value: [{"brand": "Apple", "model": "MacBook Pro"}]. Each key is a layout field label in snake_case — lower-cased with spaces replaced by underscores, so a field labelled "Serial Number" is the key "serial_number" — and Hudu requires each key to match a field that already exists on the layout given by asset_layout_id. Call hudu_get_asset_layout first to read the exact labels. Values are documented as strings, so send numbers and dates as strings ("42", "2026-01-01"). Note the asymmetry with reads: a fetched asset returns this data under `fields` as {id, label, value, position} objects, which is not a shape this parameter accepts — rebuild the label/value pairs yourself rather than sending back what you read. | |
| primary_model | No | Hardware or product model. | |
| primary_serial | No | Serial number shown at the top of the asset. | |
| asset_layout_id | No | Numeric id of the asset layout this asset uses. The layout is the template that decides which custom fields the asset has; list the choices with hudu_list_asset_layouts. | |
| primary_manufacturer | No | Manufacturer or vendor name. |