Unlock Encrypted Dataset Remotely

Hi!
I will have my TrueNAS at a remote location. I want to decrypt an encrypted dataset remotely.
As far as I understood the documentation, this could be done via the API or midclt via SSH.

Which is more secure?

Which permissions does a user need for either one?

Thanks!