Application Role Assignments
The role assignments endpoint implements functions to create, read, and delete the role assignments associated with applications resources. For more information about roles and the permissions associated with each role, refer to 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 scopes can be:
-
Organization
-
Environment
-
Population
-
Application
Applications role assignments data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
String |
Required |
Read only |
The application resource ID associated with the role assignment. |
|
String |
Required |
Read only |
The environment associated with the application role assignment. |
|
String |
Required |
Read only |
The application role assignment ID. |
|
Boolean |
Optional |
Mutable |
Indicates whether this role assignment can be deleted by the current actor. Varies depending on the actor accessing the role assignment and is only |
|
String |
Required |
Mutable |
The role ID. |
|
String |
Required |
Mutable |
The role assignment scope ID. When this is an application ID, because an application ID is guaranteed to be globally unique (across all environments), the application ID here eliminates the need to also specify the application environment ID. |
|
String |
Required |
Mutable |
The type of resource defining the scope of the Role assignment. Options are |
Response codes
|
The |
| 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. |
Application role assignment errors
In addition to the general error codes, application role assignment operations can return the following errors:
| HTTP status | Top‑level code | Detail code | When it happens and what the response contains |
|---|---|---|---|
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: A Details: |
400 |
|
|
Message: When and detailsWhen: The actor is not allowed to assign the role, or to remove it on Details: Describes the failed privilege check, such as |
400 |
|
|
Message: When and detailsWhen: The access token does not contain the claims needed to identify the actor Details: |
400 |
|
None |
Message: When and detailsWhen: A Details: None. |
400 |
|
None |
Message: When and detailsWhen: A Details: None. |
400 |
|
None |
Message: When and detailsWhen: A path identifier cannot be parsed as a UUID Details: None. |
400 |
|
|
Message: When and detailsWhen: A Details: For a JSON field conversion error, the target is the field path. Otherwise no detail is returned. |
400 |
|
|
Message: When and detailsWhen: Details: Describes the rejected filter or order. |
403 |
|
None |
Message: When and detailsWhen: The actor lacks the Details: None. |
404 |
|
None |
Message: When and detailsWhen: The application ID in the request URL does not exist in the environment or is not a WORKER application (applies to all operations) Details: None. |
404 |
|
None |
Message: When and detailsWhen: Details: None. |