RoleSystem
Methods
AddSubUser
Creates a subuser.
To call this method, make sure your service account has one of the following roles:
Parameters
description:
string
OptionalDescription of a new subuser
new_subuser_name:
string
The new subuser login for managent api authentication, should be unique within the Voximplant account. The login specified is always converted to lowercase
new_subuser_password:
string
The new subuser password. Must be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character
role_id:
intlist
OptionalThe role id list separated by semicolons (;)
role_name:
stringlist
OptionalThe role name list separated by semicolons (;)
Returns
result:
CreateKey
Creates a public/private key pair. You can optionally specify one or more roles for the key.
Parameters
description:
string
OptionalThe key's description
key_name:
string
OptionalThe key's name, up to 50 characters. Cannot be empty
role_id:
intlist
OptionalThe role ID list separated by semicolons (;). Use it instead of role_name, but not combine with
role_name:
stringlist
OptionalThe role name list separated by semicolons (;). Use it instead of role_id, but not combine with
Returns
result:
DeleteKey
Deletes the specified key.
Parameters
key_id:
string
The key's ID
Returns
result:
number
DelSubUser
Deletes a subuser.
To call this method, make sure your service account has one of the following roles:
Parameters
subuser_id:
number
The subuser's ID
Returns
result:
number
GetKeyRoles
Gets roles of the specified key.
Parameters
key_id:
string
The key's ID
with_expanded_roles:
boolean
OptionalWhether to show the roles' additional properties
Returns
result:
GetKeys
Gets key info of the specified account.
Parameters
count:
number
OptionalThe max returning record count
key_id:
string
OptionalThe key's ID
offset:
number
OptionalThe first N records are skipped in the output
with_roles:
boolean
OptionalWhether to show roles for the key
Returns
result:
GetRoles
Gets all roles.
Parameters
group_name:
string
OptionalThe role group
Returns
result:
GetSubUserRoles
Gets the subuser's roles.
To call this method, make sure your service account has one of the following roles:
Parameters
subuser_id:
number
The subuser's ID
with_expanded_roles:
boolean
OptionalWhether to show the roles' additional properties
Returns
result:
GetSubUsers
Gets subusers.
To call this method, make sure your service account has one of the following roles:
Parameters
count:
number
OptionalThe max returning record count
offset:
number
OptionalThe first N records are skipped in the output
subuser_id:
number
OptionalThe subuser's ID
with_roles:
boolean
OptionalWhether to show subuser's roles
Returns
result:
RemoveKeyRoles
Removes the specified roles of a key.
Parameters
key_id:
string
The key's ID
role_id:
intlist
The role id list separated by semicolons (;)
role_name:
stringlist
The role name list separated by semicolons (;)
Returns
result:
number
RemoveSubUserRoles
Removes the specified roles of a subuser.
To call this method, make sure your service account has one of the following roles:
Parameters
force:
boolean
OptionalWhether to remove roles from all subuser keys
role_id:
intlist
The role id list separated by semicolons (;)
role_name:
stringlist
The role name list separated by semicolons (;)
subuser_id:
number
The subuser's ID
Returns
result:
number
SetKeyRoles
Set roles for the specified key.
Parameters
key_id:
string
The key's ID
role_id:
intlist
The role id list separated by semicolons (;)
role_name:
stringlist
The role name list separated by semicolons (;)
Returns
result:
number
SetSubUserInfo
Edits a subuser.
Parameters
description:
string
OptionalThe new subuser description
new_subuser_password:
string
OptionalThe new user password. Must be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character
old_subuser_password:
string
OptionalThe subuser old password. It is required if new_subuser_password is specified
subuser_id:
number
The subuser's ID
Returns
result:
number
SetSubUserRoles
Adds the specified roles for a subuser.
To call this method, make sure your service account has one of the following roles:
Parameters
role_id:
intlist
The role id list separated by semicolons (;)
role_name:
stringlist
The role name list separated by semicolons (;)
subuser_id:
number
The subuser's ID
Returns
result:
number
UpdateKey
Updates info of the specified key.
Parameters
description:
string
The key's description
key_id:
string
The key's ID
key_name:
string
OptionalThe key's name, up to 50 characters. Cannot be empty
Returns
result:
number