Create Asset Layout
hudu_create_asset_layoutCreate a new asset layout in Hudu, setting its icon, color, asset capabilities, and custom fields. Returns the created layout with its assigned ID.
Instructions
Create a new asset layout in Hudu. An asset layout is the template behind an asset type: its icon and colour, whether its assets can hold passwords, photos, comments and files, and the set of custom fields every asset of that type carries. Layouts are instance-wide rather than per-company. Field definitions can be set when a layout is created; the documented shape for changing them afterwards contradicts the shape creation accepts, so this server does not expose field edits on update. There is no delete endpoint for layouts — set active: false to retire one.
Returns the created record, including the id Hudu assigned. Hudu answers 422 with the offending field named when validation fails.
Operation class: Create.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Font Awesome icon class shown next to assets of this type, e.g. "fas fa-server". | |
| name | Yes | Name of the layout, e.g. "Server" or "Licence". | |
| color | No | Background colour as a hex code, e.g. "#2E86C1". | |
| fields | No | The custom fields every asset on this layout will carry. This is the only documented point at which field definitions can be supplied, so include them here rather than planning to add them later. | |
| icon_color | No | Icon colour as a hex code, e.g. "#FFFFFF". | |
| include_files | No | Whether assets of this type can hold file attachments. | |
| include_photos | No | Whether assets of this type can hold photos. | |
| password_types | No | Password categories offered on assets of this type, as one string with each category on its own line (newline-separated, not an array). | |
| include_comments | No | Whether assets of this type can hold comments. | |
| include_passwords | No | Whether assets of this type can hold linked passwords. |