Add Roles to User

Restriction: This API endpoint is not supported in the Free Trial cloud.

Add one or more roles to a user.

Important: To be able to run this API endpoint, you need to be an Admin user or part of Perfecto Support.

URL

Copy
http://<your-cloud>.app.perfectomobile.com/api/v1/users/roles

Method

PUT

Header parameters

Name

Description

Perfecto-Authorization

Security Token

Data parameters (body)

Parameter Type Default Description
username* string

The name of the user being added to the device group.

roles* array of strings

The role or roles being added to the user. At least one role is required.

* Mandatory parameter

Success response

Code: 200

Error response

Status and a generic error message

Example

Copy
JSON request
{
    "username":"<username>", 
    "roles":["<role1>", "<role2>"] 
}