Is it possible to to get size output from /storage/volumes in KB/MB/GB? Or is it only in bytes. I saw the following but this seems to apply only for query parameters.
Many objects contain properties related to various sizes. Examples can be found in the aggregate object, volume object, lun object and nvme_namespace object. These properties are documented as type integer.
Unless otherwise documented, all sizes are reported in GET in bytes.
Depending on the development language-specific code generation, the API typically also requires an integer value in bytes for POST and PATCH input as well.
Where a string value is accepted, such as query parameters and ad-hoc curl requests, any of the following suffixes can be used to specify different units:
No, there is no way to ask the API to return the value in any other format other than an integer number of bytes (unless otherwise noted). Any conversion after fetching will need to be done on the client side by the application.