Solved

/cluster/addNfsSubnetWhitelist

  • 27 February 2017
  • API
  • 1 reply
  • 1312 views

Badge +1
I have been trying to add a new nfs server to the whitelist rhough API but I can't seem to get the fields right, anyone has done it?
I have been using:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '172.16.1.34/255.255.0.0' 'https://10.21.40.37:9440/PrismGateway/services/rest/v2.0/cluster/nfs_whitelist'The response message is:
"message": "Can not instantiate value of type [simple type, class com.nutanix.prism.dto.PrimitiveDTO]
icon

Best answer by ChrisRNutanix 27 February 2017, 04:46

Hey Damien!

Give this a go ...

curl -X POST -H 'Content-Type: application/json' 'https://172.16.1.101:9440/api/nutanix/v2.0/cluster/nfs_whitelist' --insecure -d '{"value":"172.16.1.34/255.255.0.0"}' --insecure -u
Of course, you probably wouldn't want to use --insecure in a production environment. :)

View original

1 reply

Userlevel 1
Badge +6
Hey Damien!

Give this a go ...

curl -X POST -H 'Content-Type: application/json' 'https://172.16.1.101:9440/api/nutanix/v2.0/cluster/nfs_whitelist' --insecure -d '{"value":"172.16.1.34/255.255.0.0"}' --insecure -u
Of course, you probably wouldn't want to use --insecure in a production environment. 🙂

Reply