Software Development Kit (SDK) and API Discussions

SDK - Get Non-Root Aggregates




I have used the ZAPI tool to generate the following XML:


<?xml version="1.0" encoding="UTF-8"?>
<netapp  xmlns="" version="1.31">
    <desired-attributes>...snipped for brevity...</desired-attributes>


Unfortunately, this still returns root aggregates (running against a CDOT 8.3.2P9 cluster). How can I get only non-root aggregates?




Re: SDK - Get Non-Root Aggregates


Not familiar with the API.. but have you tried looking for "ha_policy" of "cfo"? Only root aggregates have the ha_policy set to "cfo" (controller failover) - all others are sfo (storage failover). 

Re: SDK - Get Non-Root Aggregates


Maybe check for aggr-raid-attributes -> has-local-root and aggr-raid-attributes -> has-partner-root to both be false.  FWIW, your query works fine against my ONTAP 9.0 system.

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: SDK - Get Non-Root Aggregates


Thanks for your suggestions, everyone.


Looks like it's actually an issue with the ZAPI tool - I can use the tool to generate the code, but if I try to execute it, it brings back the wrong results. If I copy the generated XML and run it outside of the tool, it works as expected.

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums