RoleSystem
Methods
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
role_id:
intlist
OptionalThe role ID list separated by semicolon (;). Use it instead of role_name, but not combine with
role_name:
stringlist
OptionalThe role name list separated by semicolon (;). Use it instead of role_id, but not combine with
Returns
result:
GetKeys
Gets key info of the specified account.
Parameters
key_id:
string
OptionalThe key's ID
with_roles:
boolean
OptionalShow roles for the key
offset:
number
OptionalThe first N records will be skipped in the output
count:
number
OptionalThe max returning record count
Returns
result:
UpdateKey
Updates info of the specified key.
Parameters
key_id:
string
The key's ID
description:
string
The key's description
Returns
result:
number
DeleteKey
Deletes the specified key.
Parameters
key_id:
string
The key'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 semicolon (;)
role_name:
stringlist
The role name list separated by semicolon (;)
Returns
result:
number
GetKeyRoles
Gets roles of the specified key.
Parameters
key_id:
string
The key's ID
with_expanded_roles:
boolean
OptionalShow the roles' additional properties
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 semicolon (;)
role_name:
stringlist
The role name list separated by semicolon (;)
Returns
result:
number
AddSubUser
Creates a subuser.
To call this method, make sure your service account has one of the following roles:
Parameters
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 semicolon (;)
role_name:
stringlist
OptionalThe role name list separated by semicolon (;)
description:
string
OptionalDescription of a new subuser
Returns
result:
GetSubUsers
Gets subusers.
To call this method, make sure your service account has one of the following roles:
Parameters
subuser_id:
number
OptionalThe subuser's ID
with_roles:
boolean
OptionalShow subuser's roles
offset:
number
OptionalThe first N records will be skipped in the output
count:
number
OptionalThe max returning record count
Returns
result:
SetSubUserInfo
Edits a subuser.
Parameters
subuser_id:
number
The subuser's ID
old_subuser_password:
string
OptionalThe subuser old password. It is required if new_subuser_password is specified
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
description:
string
OptionalThe new subuser description
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
SetSubUserRoles
Adds the specified roles for 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
role_id:
intlist
The role id list separated by semicolon (;)
role_name:
stringlist
The role name list separated by semicolon (;)
Returns
result:
number
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
OptionalShow the roles' additional properties
Returns
result:
RemoveSubUserRoles
Removes the specified roles of 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
role_id:
intlist
The role id list separated by semicolon (;)
role_name:
stringlist
The role name list separated by semicolon (;)
force:
boolean
OptionalRemove roles from all subuser keys
Returns
result:
number
GetRoles
Gets all roles.
Parameters
group_name:
string
OptionalThe role group
Returns
result: