I am trying to create volume using REST APIs however its failing with 400 error code.
Here is the syntax I have used
data = {svm.name: svmname, name: volname, aggregates.name: aggrname}
newHeaders = {'accept': 'application/json', 'Content-type': 'application/json'}
response1 = requests.post("https://<clus-lif>/api/storage/volumes", json=data, auth=('xxxx', 'xxxx'), verify=False, headers=newHeaders)
print(response1.status_code)
svmname,aggrname,volname are parameters passed through script.
All the mandatory values are passed for volume creation not sure why its giving 400 error code.
Could you advise if any additional values or any modification needed to this code.
Thanks,
-Srini