Rate this page:

RoleSystem

Methods

CreateKey

Copy URL

Creates a public/private key pair. You can optionally specify one or more roles for the key.

CreateKey example

CreateKey example

Create a key pair.

Parameters

  • description:

    string

    Optional

    The key's description

  • key_name:

    string

    Optional

    The key's name, up to 50 characters. Cannot be empty

  • role_id:

    intlist

    Optional

    The role ID list separated by semicolons (;). Use it instead of role_name, but not combine with

  • role_name:

    stringlist

    Optional

    The role name list separated by semicolons (;). Use it instead of role_id, but not combine with

Returns

GetKeys

Copy URL

Gets key info of the specified account.

GetKeys example

GetKeys example

Get keys info of the specified account.

Parameters

  • key_id:

    string

    Optional

    The key's ID

  • with_roles:

    boolean

    Optional

    Whether to show roles for the key

  • offset:

    number

    Optional

    The first N records are skipped in the output

  • count:

    number

    Optional

    The max returning record count

Returns

UpdateKey

Copy URL

Updates info of the specified key.

UpdateKey example

UpdateKey example

Create a new subuser for account_id = 1.

Parameters

  • key_id:

    string

    The key's ID

  • description:

    string

    The key's description

  • key_name:

    string

    Optional

    The key's name, up to 50 characters. Cannot be empty

Returns

  • result:

    number

DeleteKey

Copy URL

Deletes the specified key.

DeleteKey example

DeleteKey example

Parameters

  • key_id:

    string

    The key's ID

Returns

  • result:

    number

SetKeyRoles

Copy URL

Set roles for the specified key.

SetKeyRoles example

SetKeyRoles example

Set roles 1, 2, 3 for the 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

GetKeyRoles

Copy URL

Gets roles of the specified key.

GetKeyRoles example

GetKeyRoles example

Get roles of the key.

Parameters

  • key_id:

    string

    The key's ID

  • with_expanded_roles:

    boolean

    Optional

    Whether to show the roles' additional properties

Returns

RemoveKeyRoles

Copy URL

Removes the specified roles of a key.

RemoveKeyRoles example

RemoveKeyRoles example

Remove the roles 1, 2, 3 from the 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

AddSubUser

Copy URL

Creates a subuser.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
AddSubUser example

AddSubUser example

Create a new subuser for account_id = 1.

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

    Optional

    The role id list separated by semicolons (;)

  • role_name:

    stringlist

    Optional

    The role name list separated by semicolons (;)

  • description:

    string

    Optional

    Description of a new subuser

Returns

GetSubUsers

Copy URL

Gets subusers.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
GetSubUsers example

GetSubUsers example

Get subusers info.

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID

  • with_roles:

    boolean

    Optional

    Whether to show subuser's roles

  • offset:

    number

    Optional

    The first N records are skipped in the output

  • count:

    number

    Optional

    The max returning record count

Returns

SetSubUserInfo

Copy URL

Edits a subuser.

SetSubUserInfo example

SetSubUserInfo example

Edit the password and description for the subuser with id = 12 from account_id = 1.

Parameters

  • subuser_id:

    number

    The subuser's ID

  • old_subuser_password:

    string

    Optional

    The subuser old password. It is required if new_subuser_password is specified

  • new_subuser_password:

    string

    Optional

    The 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

    Optional

    The new subuser description

Returns

  • result:

    number

DelSubUser

Copy URL

Deletes a subuser.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
DelSubUser example

DelSubUser example

Delete the subuser with id = 12 from account_id = 1.

Parameters

  • subuser_id:

    number

    The subuser's ID

Returns

  • result:

    number

SetSubUserRoles

Copy URL

Adds the specified roles for a subuser.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
SetSubUserRoles example

SetSubUserRoles example

Add the roles 1, 2, 3 to the subuser with id = 12.

Parameters

  • subuser_id:

    number

    The subuser'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

GetSubUserRoles

Copy URL

Gets the subuser's roles.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
GetSubUserRoles example

GetSubUserRoles example

Get subuser's roles.

Parameters

  • subuser_id:

    number

    The subuser's ID

  • with_expanded_roles:

    boolean

    Optional

    Whether to show the roles' additional properties

Returns

RemoveSubUserRoles

Copy URL

Removes the specified roles of a subuser.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
RemoveSubUserRoles example

RemoveSubUserRoles example

Remove roles 1,2,3 from the subuser with id = 12.

Parameters

  • subuser_id:

    number

    The subuser's ID

  • role_id:

    intlist

    The role id list separated by semicolons (;)

  • role_name:

    stringlist

    The role name list separated by semicolons (;)

  • force:

    boolean

    Optional

    Whether to remove roles from all subuser keys

Returns

  • result:

    number

GetRoles

Copy URL

Gets all roles.

GetRoles example

GetRoles example

Get all roles.

Parameters

  • group_name:

    string

    Optional

    The role group

Returns

GetRoleGroups

Copy URL

Gets role groups.

GetRoleGroups example

GetRoleGroups example

Get all role groups.

Returns