Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
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

Inode (files) value on aggregate level?

ilantivienna

How do I get these two values trough the new REST API?

 

files-total: Total user-visible file (inode) count, i.e., maximum number of user-visible files (inodes) that this referenced file system can currently hold. If the referenced file system is restricted or offline, a value of 0 is returned

 

files-used: Number of user-visible files (inodes) used in the referenced file system. If the referenced file system is restricted or offline, a value of 0 is returned

 

The descriptions and attribute-names are taken from the old ZAPI docs.

3 REPLIES 3

donny_lang

Those two values are contained within the "/storage/volumes/{uuid}" API, specifically the "files" property. A curl command to output that data for a given volume UUID would look like this: 

 

curl -X GET "https://<cluster name/IP>/api/storage/volumes/{your_volume_uuid}?fields=files" -H "accept: application/json"


{
  "uuid": "320a72dd-bd11-11e9-876d-000c29fdc162",
  "name": "test302_data",
  "files": {
    "maximum": 7782389,
    "used": 96
  }
}

For reference (and because the new REST API documentation is awesome), you can look at the entire API documentation by going to "https://<cluster name/IP>/docs/api", which will allow you to interact with the API to try it out before writing code that utilizes it. You can also view the raw Swagger YAML file from the screenshot below:

 

2019-12-19 08_22_10-ONTAP REST API.png

 

I just did a "Ctrl+F" and searched for a couple key words from your post from the ZAPI documentation, and was able to find out the proper API call from there. Hope that helps! 

 

Donny

ilantivienna

Thanks Donny, but I am looking for values of an aggregate, not volume ... (as "hidden" in the subject of my question 😉 ) Any idea about that? The old ZAPI gave that value back ...

donny_lang

My apologies, reading comprehension isn't my strong suit apparently. Smiley Very Happy

 

I do not see a way to collect this data at the aggregate level from the REST API. 

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