This won't be possible via any API as these are advanced options. Need to write a custom command with something like following one:
$command = "priv set advanced ;registry set options.thresholds.fsFull 101" Or "priv set advanced ;registry set options.thresholds.fsNearlyFulll 101"
Then to invoke the command :
Invoke-NaSsh -Command $command
You can do this for per volume basis also as the KB shows volume level option also.
If you want a command implementation for the same you may contact one of the WFA field champions.
Thanks
Tanmoy