There is a Security package in SYS. It allows do a lot via terminal calls. Can be useful via REST API too (secured of course)
Thank you for submitting the idea.
This idea was implemented by Developer Community member(s). Please check the solution in the comments.
Thank you @Lorenzo Scaleze for implementing this idea.
Implementation is available on the OEX: Config-API.
Article related to implementation is: "REST API for Security Package"