The API layer only works for local folders so you cannot set working and project folders in cloud repositories. This is because cloud authentication cannot be tied to API-only modules. This limitation may be removed in future releases. You can manually set the working folders and project folders in the cloud through the normal user-interface workflows.