The "cloneAccount" action clones an existing account including its login properties and roles. It assigns a new name and a new password to the new account and optionally assigns new metadata.
Note Cloning the Admin account is not allowed because it has unrestricted permissions to do everything. No other account can have this this level of permission. Every other account must be assigned roles to receive permissions.
Request examples
Minimal
{
"action": "cloneAccount",
"params": {
"sourceUsername": "NewAccount1",
"cloneUsername": "NewAccount3",
"clonePassword": ""
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"api": "admin",
"action": "cloneAccount",
"params": {
"sourceUsername": "NewAccount2",
"cloneUsername": "NewAccount4",
"clonePassword": "CorrectHorseBatteryStaple",
"cloneRoles": true,
"cloneDescription": "This account was cloned from NewAccount2.",
"cloneMetadata": {}
},
"requestId": "1",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
cloneDescription |
The
|
Optional with default of ""
|
string | 0 to 31 bytes |
cloneMetadata |
The
|
Optional with default of {}
|
object | 0 or more key/value pairs up to 65,500 bytes |
clonePassword |
The
|
Required - No default value | string | 1 to 63 bytes |
cloneRoles |
The
|
Optional with default of true
|
Boolean |
|
cloneUsername |
The
|
Required - No default value | string | 1 to 31 bytes |
sourceUsername |
The
|
Required - No default value | string | 1 to 31 bytes |