The users role assignments endpoint implements functions to create, read, and delete the role assignments associated with user resources. For more information about roles and the permissions associated with each role, see Roles.

Role assignments are defined by the role itself, and at a more granular level by the scope attribute associated with the role assignment. The role assignment scope identifies the type of platform resource that defines the scope, and the id of the specific resource to which the scope applies. The following sample shows the scope attribute, which includes the resource type and id attributes. In this case, the scope is restricted to the environment resource identified by its id.

  "scope": {
   "id": "d928aa51-c194-4333-9cf5-0fd0c9b7d62f",
   "type": "ENVIRONMENT"

Role assignment scope types include:

Users role assignments data model

Property Description A string that specifies the environment associated with the user.
id A string that specifies the user role assignment ID.
readOnly A boolean that specifies whether this role assignment can be deleted by the current actor. A string that specifies the role ID. A string that specifies the role assignment scope ID.
scope.type A string that specifies the type of resource defining the scope of the Role assignment. Options are ORGANIZATION, ENVIRONMENT, and POPULATION.

Response codes

Code Message
200 Successful operation.
201 Successfully created.
204 Successfully removed. No content.
400 The request could not be completed.
401 You do not have access to this resource.
404 The requested resource was not found.