The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

ONTAP Rest API Discussions

size output from /storage/volumes

kramar

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.

 

Overview

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:

Suffix

Definition

KB

kilobytes (1024 bytes, aka kibibytes)

MB

megabytes (KB x 1024, aka mebibytes)

GB

gigabytes (MB x 1024, aka gibibytes)

TB

terabytes (GB x 1024, aka tebibytes)

PB

petabytes (TB x 1024, aka pebibytes)

1 ACCEPTED SOLUTION

RobertBlackhart

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.

View solution in original post

1 REPLY 1

RobertBlackhart

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.

View solution in original post

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public