Software Development Kit (SDK) and API Discussions

In listing all volumes, online filter not working

neha_T
1,754 Views

operations i perform:

            vol_url = baseurl + "ontap/volumes/"

            params = { "state": "online" }

            list_volumes = self.get(vol_url, params).json()

 

but in list_volumes i am getting offline volume also...

is there something i am missing ??

1 REPLY 1

AkashShukla
1,501 Views

The query shoule be similar to 

 

URL : base-url/ontap/volumes?state=online

 

The URL should be modified to do the filter-ing (Instead of the GET parameters).

 

Changes to be done in above code:

 

vol_url = baseurl + "ontap/volumes/"

vol_url += "?state=online"

list_volumes = self.get(vol_url).json()

Public