Assigning roles to users

A user with admin role can assign roles to a tenant user.

Procedure

  1. In a REST client platform, add the authentication details of the tenant to assign roles to a user.
    
    //In case of Instance API key 
    Headers:
    {
    "x-instance-api-key": "instance_api_key"
    }
     
    // In case of MCSP or ISV token
    Headers:
    {
    "Authorization": "mcsp_or_isv_token"
    }
    
    Body:
    	{
    	"username":<tenant_username>
    	"roles": ['role1','role2']
    	}
  2. Make a PUT request at the URL of the project.

    URL Syntax: <domain>/apis/v1/rest/assign-roles

    Method: PUT

    If the request is successful, you receive the response code for success.
    {
    output:
    {
    	"uid": "<user_uid>",
    	"email": "<user_email>",
    	"first_name": "<user_first_name>",
    	"last_name": "<user_last_name>",
    	"roles":
    		[
    		<role_data>
    		],
    	"wmic_username": "<user_uid>",
    	"is_admin": true || false,
    	"is_developer": true || false,                
    	"is_owner": true || false
    }      
    }