The "linkRolesWithAccounts" action adds or removes accounts to or from roles.
Important Changing role-based privileges does not affect open data files because their privileges are cached. When you are done modifying privileges, you must run the
"applyPrivileges"action to apply your changes to open data files.
Request examples
Minimal
{
"action": "linkRolesWithAccounts",
"params": {
"add": [
{
"roleNames": [
"mquser"
],
"usernames": [
"account2"
]
}
],
"remove": [
{
"roleNames": [
"role2"
],
"usernames": [
"account2"
]
}
]
},
"authToken": "",
"requestId": ""
}
Response examples
Minimal
{
"authToken": "",
"requestId": "",
"errorCode": 0,
"errorMessage": ""
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
add |
The |
Optional with default of {}
|
array of objects |
|
|
add .roleNames |
The "roleNames" property specifies the roles to be added to or deleted from the accounts specified by the "usernames" property. This property can specify one or more roles, each between 1 and 64 bytes. |
Optional with default of []
|
array | 1 or more strings, each between 1 and 30 bytes. |
|
add .usernames |
The "usernames" property specifies the names of the accounts that the action will target. |
Optional with default of []
|
array | 0 or more usernames, each between 1 and 64 bytes. |
remove |
The |
Optional with default of {}
|
array of objects |
|
|
remove .roleNames |
The "roleNames" property specifies the roles to be added to or deleted from the accounts specified by the "usernames" property. This property can specify one or more roles, each between 1 and 64 bytes. |
Optional with default of []
|
array | 1 or more strings, each between 1 and 30 bytes. |
|
remove .usernames |
The "usernames" property specifies the names of the accounts that the action will target. |
Optional with default of []
|
array | 0 or more usernames, each between 1 and 64 bytes. |