NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

flexgroup-msid missing in REST API?

PoINT_dg
1,721 Views

Hi,

 

REST API returns "msid" for each reported volume, but how do I get the "flexgroup-msid" which can be displayed via CLI? My goal is to find the flexgroup volume for a given "flexgroup-msid" and I would expect that the "flexgroup-msid" is the same as the "msid" of the flexgroup itself, but this seems not to be the case. 

 

Thanks,

dg.

2 REPLIES 2

PoINT_dg
1,598 Views

Hi,

I did some more testing with ONTAP 9.14.1 simulator and found that this seems to be an issue in REST API: The "msid" returned for flexgroup volumes is the one of the first constituent and not that of the flexgroup itself. My above expectation is correct, that "msid" and "flexgroup-msid" are the same for flexgroup volumes which can be confirmed via CLI:

cluster::volume*> show -fields flexgroup-msid, msid -volume-style-extended flexgroup
vserver volume msid       flexgroup-msid
------- ------ ---------- --------------
svm0    flex1  2150247878 2150247878

 

But the msid returned by REST API for this same volume is 2150247879, which is the first constituent in my case:

    {
      "uuid": "387a6e6e-174c-11ef-8b43-000c2966c17d",
      "name": "flex1",
      "style": "flexgroup",
      "type": "rw",
      "msid": 2150247879,
      "_links": {
        "self": {
          "href": "/api/storage/volumes/387a6e6e-174c-11ef-8b43-000c2966c17d"
        }
      }
    }

 

The legacy ONTAPI returns correct information on the same system.

 

Can someone from NetApp confirm my observation or tell me where I am wrong?

 

PoINT_dg
1,499 Views

More input from my side. This only happens when using SVM tunneling. The returned msid is incorrect:

curl -X GET "https://192.168.202.190/api/storage/volumes?fields=name,style,type,msid" -H "X-Dot-SVM-Name: svm0"
{
  "records": [
    {
    },
    {
      "uuid": "387a6e6e-174c-11ef-8b43-000c2966c17d",
      "name": "flex1",
      "style": "flexgroup",
      "type": "rw",
      "msid": 2150247879,
      "_links": {
        "self": {
          "href": "/api/storage/volumes/387a6e6e-174c-11ef-8b43-000c2966c17d"
        }
      }
    }
  ],
  "num_records": 2,
  "_links": {
    "self": {
      "href": "/api/storage/volumes?fields=name,style,type,msid"
    }
  }
}

 Without tunneling, the msid is correct:

curl -X GET "https://192.168.202.190/api/storage/volumes?fields=name,style,type,msid"
{
  "records": [
    {
    },
    {
      "uuid": "387a6e6e-174c-11ef-8b43-000c2966c17d",
      "name": "flex1",
      "style": "flexgroup",
      "type": "rw",
      "msid": 2150247878,
      "_links": {
        "self": {
          "href": "/api/storage/volumes/387a6e6e-174c-11ef-8b43-000c2966c17d"
        }
      }
    }
  ],
  "num_records": 2,
  "_links": {
    "self": {
      "href": "/api/storage/volumes?fields=name,style,type,msid"
    }
  }
}

 

Additionally, there seems to be some caching causing inconsistent results.

Public