Skip to main content
NetApp Knowledge Base

How to get list of aggregates associated to SVM using API ?

Views:
43
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

Applies to

  • ONTAP 9
  • API

Answer

Yes, we can list aggregates which are associated to SVMs:

  • From API:

Curl:
curl -X GET "https://<Cluster-IP>/api/svm/svms?fields=aggregates&return_records=true&return_timeout=15" -H  "accept: application/json" -H  "authorization: Basic YWRxxxxxxxxx546gfnfda"

Request URL:
https://<Cluster-IP>/api/svm/svms?fields=aggregates&return_records=true&return_timeout=15

Sample:

{
  "records": [
    {
      "uuid": "c537a90a-85eb-11ef-8fe0-00a098daafd4",
      "name": "svm1",
      "aggregates": [
        {
          "name": "aggr1",
          "uuid": "68feeb17-657a-422c-b80a-4987963ce002"
        }
      ]
    },
    {
      "uuid": "eb403c17-89e7-11ef-8fe0-00a098daafd4",
      "name": "test",
      "aggregates": [
        {
          "name": "aggr2",
          "uuid": "cd757222-0dba-49fe-ab15-b541cf9abe83"
        },
        {
          "name": "aggr1",
          "uuid": "68feeb17-657a-422c-b80a-4987963ce002"
        }
      ]
    }
  ],
  "num_records": 2
}

 

  • From CLI:

::*> vserver show -fields aggr-list                                                                                            
vserver aggr-list
------- ---------
Cluster -
fas8200-2n-rtp-5 -
fas8200-rtp-12a -
fas8200-rtp-12b -
svm1    aggr1
test    aggr2,aggr1
6 entries were displayed.

 

In above Example, we could see vserver 'svm1' have one aggregate – aggr1, whereas vserver 'test' have two aggregates – aggr1 & aggr2.

Additional Information

 

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.