Hi Rezk,
Try using the Active IQ gateway REST API Get method: /gateways/{uuid}/{path} EG:
curl -X GET "https://aiqum.demo.netapp.com/api/gateways/2f3c6e9c-acfc-11e9-8271-005056b03109/storage/volumes/dec3deac-aee4-11ea-85a7-005056b01307%3Ffields%3Daggregates" -H "accept: application/hal+json" -H "X-Dot-SVM-UUID: 503ac2b8-acfe-11e9-8271-005056b03109" -H "authorization: Basic YWRtaW46TmV0YXBwMSE=" -H "UM-CSRF-Token: 341e13f1-728a-4c6e-a8f6-abf9a624f271"
Where the first UUID is the datasource (cluster) and the path is the relative ONTAP REST API path for the flexgroup volume:
https://cluster2.demo.netapp.com/api/storage/volumes/dec3deac-aee4-11ea-85a7-005056b01307?fields=aggregates
Based on the above example the Active IQ REST API returns an array of aggregates for the flexgroup volume (I only have one aggregate in my lab but in theory if you flexgroup was distributed on mulitple aggregates it should return a list of them)
{
"uuid": "dec3deac-aee4-11ea-85a7-005056b01307",
"name": "flexgroup_001",
"aggregates": [
{
"name": "aggr1_cluster2_01",
"uuid": "e329b91b-0633-4186-8c8d-aa4c7191da16"
}
],
"_links": {
"self": {
"href": "/api/gateways/2f3c6e9c-acfc-11e9-8271-005056b03109/storage/volumes/dec3deac-aee4-11ea-85a7-005056b01307"
}
}
}
Also check out the PowerShell module I'm developing for Active IQ . Perhaps there are some useful functions and example in the module for you to use. Hope that helps?
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.