Request examples
Minimal
{
"action": "assignRolesToAccounts",
"params": {
"add": [
{
"roleNames": [
"admin"
],
"usernames": [
"NewAccount1",
"NewAccount2"
]
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Add and remove roles
{
"api": "admin",
"action": "assignRolesToAccounts",
"params": {
"add": [
{
"roleNames": [
"admin"
],
"usernames": [
"NewAccount1"
]
}
],
"remove": [
{
"roleNames": [
"admin"
],
"usernames": [
"NewAccount2"
]
}
]
},
"requestId": "1",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
add |
The |
Optional with default of {}
|
array of objects |
|
|
add .rolenames |
The "add": [
{
"roleNames": [
"admin"
],
"usernames": [
"NewAccount1"
]
}
] |
Optional with default of []
|
array | 1 or more strings, each between 1 and 64 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 "add": [
{
"roleNames": [
"admin"
],
"usernames": [
"NewAccount1"
]
}
] |
Optional with default of []
|
array | 1 or more strings, each between 1 and 64 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. |