user0241233
Dabbler
- Joined
- Oct 19, 2022
- Messages
- 15
Hello,
I'm trying to use REST API endpoint /pool/dataset/id/ PUT to modify a dataset that I created. Specifically, I'd like to change the name of the dataset. This is what I have been able to achieve so far,
But I'm getting a weird output.
When I try changing something else, like the "quota",
I get the following error:
TrueNAS Scale Version: TrueNAS-SCALE-22.02.4
Let me know if you need further info and please help with this,
Thanks,
I'm trying to use REST API endpoint /pool/dataset/id/ PUT to modify a dataset that I created. Specifically, I'd like to change the name of the dataset. This is what I have been able to achieve so far,
Code:
curl --location --request PUT 'http://abc.com/api/v2.0/pool/dataset/id/StoragePool%2Fdata-test%2Fgroups%2Fhardware' \ --header 'Authorization: Basic ######' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "StoragePool/data-test/groups/software" }'
But I'm getting a weird output.
Code:
{ "pool_dataset_update.name": [ { "message": "Field was not expected", "errno": 22 } ] }
When I try changing something else, like the "quota",
Code:
curl --location --request PUT 'http:////abc.com/api/v2.0/pool/dataset/id/StoragePool%2Fdata-test%2Fgroups%2Fhardware' \ --header 'Authorization: Basic ######' \ --header 'Content-Type: application/json' \ --data-raw '{ "quota": 2000000000 }'
I get the following error:
Code:
500 Internal Server Error Server got itself in trouble
TrueNAS Scale Version: TrueNAS-SCALE-22.02.4
Let me know if you need further info and please help with this,
Thanks,