How to Assign roles to user through rest api

hi can anyone help me out in assigning roles to user through frappe api or custom api ?

Have you solved this?