I know how to restore the permission in each folder ou library.
Just using this: _api/web/lists/getByTitle('Documentos')/ResetRoleInheritance() ✔️
But, how to restore the permision to the site?
Users can be added directly in this location, or also can be added in permisions of site.
Again, im talkin about the users or groups that was added in the Site, not in the Folder, File or Library.

Thanks 😃