I need to set user permission for my dataset through API

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You could start by looking at the API docs on your TrueNAS server... http://truenas.ip/api/docs/

There you will probably discover that pool.dataset can set the permission types, but not the individual permissions for a dataset.

You may be able to do something with smb.sharesec... but that's only for SMB shares, so maybe not what you need.

If you're looking for detailed advice on implementing the API for commercial purposes, you're probably going to need to pay someone to work with you on it.
 

jegan

Cadet
Joined
Jan 12, 2022
Messages
3
Thanks for your reply

I think there is a lot of difference between TrueNAS and FreeNAS API, the endpoint is totally different. Is there any other official document for the FreeNAS server?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You didn't specify a particular version, so I worked on the assumption that you're using the latest... either TrueNAS CORE 12.0 (equivalent to FreeNAS) or FreeNAS 11.3 (the last version with that title).

The pointer I gave you to the API docs works exactly the same on FreeNAS 11.3.

I think there is a lot of difference between TrueNAS and FreeNAS API
Maybe you mean between FreeNAS API 1.0 and API 2.0... 2.0 is the same on FreeNAS, TrueNAS CORE and even mostly the same on SCALE.

There is an online reference that provides information a little differently than the included docs on your server:

If you want to do something new with a product that's entirely out of support, you're going to be on an expensive journey.

If you do upgrade to a version that supports the current API, you might be interested in this section:
 
Top