How to change permissions in Spaces of Confluence by rest-api?

Are there opportunities to change permissions for Spaces of confluence by rest-api? I saw different implementations XML-RPC and SOAP APIs but as I understood they`ve already deprecated. Are there any actual implementations which don`t deprecated? Moreover, I see two documentations of rest-api where one of these allows to create permissions when Space is being created, but another doesn`t.
Where allowed
Where doesn`t

Where is right?