View the original community article here
Last tested: Sep 14, 2020
Yes, you can do this via the API!
With admin credentials, use login_user to get an API access token to execute as the target user. Then call reset_project_to_production(proj_id) using that user access token to reset that user's dev dir to production for that project.
To get the project_id, you might find it useful to use the all_projects call.
cite API docs
This content is subject to limited support.