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()