Add roles to admin user or API Key
Changed onAllows you to add License Manager roles to a particular admin user or API key by specifying the list of role IDs on the request body.
Permissions
Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:
| Product | Category | Resource |
|---|---|---|
| License Manager | Services access control | Save user |
You can create a custom role with that resource or use one of the following predefined roles:
| Role | Resource |
|---|---|
| User Administrator - RESTRICTED | Save user |
❗ Assigning a predefined role to users or application keys usually grants permission to multiple License Manager resources. If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see Best practices for using application keys.
To learn more about machine authentication at VTEX, see Authentication overview.
Request
- Base URLhttps://apiexamples.vtexcommercestable.com.br
- URLhttps://apiexamples.vtexcommercestable.com.br/api/license-manager/users/{userId}/roles
- Auth
- API key in header X-VTEX-API-AppKey and API key in header X-VTEX-API-AppToken
- or API key in header VtexIdclientAutCookie
Path parameters
ID of the user.
Request body
Array containing role IDs.
Example request
[ 9000 ]
Response
Success - A no-content response, but the roles were added successfully.
Changes
- warning
deleted the
pathrequest parameteraccountName - warning
deleted the
pathrequest parameterenvironment
- warning
- breaking
removed the success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the success response with the status
- breaking