Forum Discussion
- pratik_narodeNovice Imboeckelmann Thanks for your reply, but I have already fix this
- mboeckelmannNovice Ipratik.narode Have you tried without using the filter? When you add a specific param setting as an url param, you shouldn’t have to specify filter.
- mboeckelmannNovice IFor volume, you would be looking like this by name:
- mboeckelmannNovice I```try: response = requests.get( url="https://172.16.211.129/api/2.7/volumes", params={ "names": "testvol1", }, headers={ "x-auth-token": "c6ced69c-dea1-4db1-9666-f86fd8b9c6cf", }, ) print('Response HTTP Status Code: {status_code}'.format( status_code=response.status_code)) print('Response HTTP Response Body: {content}'.format( content=response.content)) except requests.exceptions.RequestException: print('HTTP Request failed')```
- mboeckelmannNovice Icurl equiv: curl “https://172.16.211.129/api/2.7/volumes?names=testvol1” \ -H ‘x-auth-token: c6ced69c-dea1-4db1-9666-f86fd8b9c6cf’
- mboeckelmannNovice Ifor serial, similarly:
- mboeckelmannNovice Icurl “https://172.16.211.129/api/2.7/volumes?serial=260B9DBEE3104956000113E6”
- mboeckelmannNovice I```try: response = requests.get( url="https://172.16.211.129/api/2.7/volumes", params={ "serial": "260B9DBEE3104956000113E6", }, headers={ "x-auth-token": "c6ced69c-dea1-4db1-9666-f86fd8b9c6cf", }, ) print('Response HTTP Status Code: {status_code}'.format( status_code=response.status_code)) print('Response HTTP Response Body: {content}'.format( content=response.content)) except requests.exceptions.RequestException: print('HTTP Request failed')```