Adds use_sudo parameter to all relevant api functions

This allows to make deployments where sudo must be used.