There's a full example in the nfs_setup.py script (https://github.com/NetApp/ontap-rest-python/blob/master/examples/rest_api/nfs_setup.py). But the part that would answer your question is that you need to send a PATCH request to the /api/storage/volumes/{uuid} endpoint for your volume and set the nas.path property. Here's an example using curl:
~/$ curl -ku admin -X PATCH -d '{"nas": {"path": "/my_files"}}' https://<cluster_mgmt>/api/storage/volumes/10a7fcdb-0746-11ec-bbfb-005056bb0536
Enter host password for user 'admin':
{
"job": {
"uuid": "65cc6310-097b-11ec-9580-005056bb0536",
"_links": {
"self": {
"href": "/api/cluster/jobs/65cc6310-097b-11ec-9580-005056bb0536"
}
}
}
}~/$
~/$ curl -ku admin https://<cluster_mgmt>/api/cluster/jobs/65cc6310-097b-11ec-9580-005056bb0536
Enter host password for user 'admin':
{
"uuid": "65cc6310-097b-11ec-9580-005056bb0536",
"description": "PATCH /api/storage/volumes/10a7fcdb-0746-11ec-bbfb-005056bb0536",
"state": "success",
"message": "success",
"code": 0,
"start_time": "2021-08-30T06:16:53-04:00",
"end_time": "2021-08-30T06:16:54-04:00",
"svm": {
"name": "vs1",
"uuid": "db390e8d-0435-11ec-a099-005056bb0536",
"_links": {
"self": {
"href": "/api/svm/svms/db390e8d-0435-11ec-a099-005056bb0536"
}
}
},
"_links": {
"self": {
"href": "/api/cluster/jobs/65cc6310-097b-11ec-9580-005056bb0536"
}
}
}~/$