Add role name validation
Change input name for convenient param parsing
Improve processing of rest api requests