Skip to content

Storage (HAL)

Base path: /api/v1/hal/storage

The Storage API exposes disk and volume information through a hardware abstraction layer. It works on any Linux system with a basic provider, and supports advanced features (RAID, shares) when OpenMediaVault is installed.

GET /hal/storage/status

Returns overall storage status.

Response fields:

FieldTypeDescription
providerstringlinux-basic or omv
total_bytesintegerTotal storage capacity
used_bytesintegerUsed storage
free_bytesintegerFree storage
healthstringhealthy, warning, critical, or unknown

GET /hal/storage/capabilities

Returns what the current storage provider supports.

Response fields:

FieldTypeDescription
providerstringCurrent provider name
capabilitiesobjectBoolean flags for each capability
missing_for_fullstring?"openmediavault" or null

Capabilities include: canListDisks, canListVolumes, canGetUsage, canGetDataUsage, canGetSmart, canCreatePool, canManageShares, and more.

GET /hal/storage/disks

Lists physical disks with model, serial, size, type, temperature, and SMART status. Cached for 5 minutes.

Response: Array of disk objects with partitions array.

GET /hal/storage/disks/:id/smart

Returns SMART health data for a specific disk. The :id parameter uses format disk_[a-z0-9]+.

Response fields:

FieldTypeDescription
disk_idstringDisk identifier
overall_statusstringhealthy, warning, or critical
power_on_hoursintegerTotal hours powered on
temperature_cintegerCurrent temperature
reallocated_sectorsintegerCount of reallocated sectors
attributesobject[]Full SMART attribute table

Returns null if SMART is unavailable for the disk. Cached for 30 minutes.

GET /hal/storage/volumes

Lists mounted volumes. Automatically filters virtual filesystems (tmpfs, devtmpfs, etc.).

Query parameters:

ParameterTypeDefaultDescription
include_windowsbooleanfalseInclude Windows drives in WSL2

Response: Array of volume objects with mount_point, filesystem, size_bytes, used_bytes, free_bytes, and status.

GET /hal/storage/data-usage

Breaks down storage usage by data category. Cached for 5 minutes.

Categories: files, photos, attachments, models (AI models), media, crypto (blockchain), backups, database.

Each category includes name, label, size_bytes, and status (ok or timeout if calculation exceeds 30s).

GET /hal/storage/pools — List RAID pools (empty with linux-basic provider)

POST /hal/storage/pools — Create RAID pool (requires OMV)

Body: { "name": "...", "type": "raid0|raid1|raid5|raid6|raid10", "diskIds": ["disk_sdc", "disk_sdd"] }

POST /hal/storage/detect-provider

Re-detects the storage provider (e.g., after installing OpenMediaVault). Requires admin role. Invalidates all cache.

Response: { "previous": "linux-basic", "current": "omv", "changed": true }