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, see this article for details.

CreateKey example

CreateKey example

Create a key pair.

Parameters

  • description:

    string

    Optional

    The key's description.

  • role_id:

    intlist

    Optional

    The role ID list separated by the ';' symbol. Use it instead of role_name, but not combine with.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol. 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

    Show roles for the key.

  • offset:

    number

    Optional

    The first N records will be 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

    Optional

    The key's ID

  • description:

    string

    Optional

    The key's description.

Returns

  • result:

    number

DeleteKey

Copy URL

Deletes the specified key.

DeleteKey example

DeleteKey example

Parameters

  • key_id:

    string

    Optional

    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

    Optional

    The key's ID.

  • role_id:

    intlist

    Optional

    The role id list separated by the ';' symbol.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol.

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

    Optional

    The key's ID.

  • with_expanded_roles:

    boolean

    Optional

    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

    Optional

    The key's ID.

  • role_id:

    intlist

    Optional

    The role id list separated by the ';' symbol.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol.

Returns

  • result:

    number

AddSubUser

Copy URL

Creates a subuser.

AddSubUser example

AddSubUser example

Create a new subuser for account_id = 1

Parameters

  • new_subuser_name:

    string

    Optional

    Login of a new subuser for authentication, should be unique within the Voximplant account. The login specified is always converted to lowercase.

  • new_subuser_password:

    string

    Optional

    Password of a new subuser, plain text.

  • role_id:

    intlist

    Optional

    The role id list separated by the ';' symbol.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol.

  • description:

    string

    Optional

    Description of a new subuser.

Returns

GetSubUsers

Copy URL

Gets subusers.

GetSubUsers example

GetSubUsers example

Get subusers info

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID.

  • with_roles:

    boolean

    Optional

    Show subuser's roles

  • offset:

    number

    Optional

    The first N records will be 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

    Optional

    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. The length must be at least 6 symbols.

  • description:

    string

    Optional

    The new subuser description.

Returns

  • result:

    number

DelSubUser

Copy URL

Deletes a subuser.

DelSubUser example

DelSubUser example

Delete the subuser with id = 12 from account_id = 1

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID.

Returns

  • result:

    number

SetSubUserRoles

Copy URL

Adds the specified roles for a subuser.

SetSubUserRoles example

SetSubUserRoles example

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

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID.

  • role_id:

    intlist

    Optional

    The role id list separated by the ';' symbol.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol.

Returns

  • result:

    number

GetSubUserRoles

Copy URL

Gets the subuser's roles.

GetSubUserRoles example

GetSubUserRoles example

Get subuser's roles.

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID.

  • with_expanded_roles:

    boolean

    Optional

    Show the roles' additional properties.

Returns

RemoveSubUserRoles

Copy URL

Removes the specified roles of a subuser.

RemoveSubUserRoles example

RemoveSubUserRoles example

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

Parameters

  • subuser_id:

    number

    Optional

    The subuser's ID.

  • role_id:

    intlist

    Optional

    The role id list separated by the ';' symbol.

  • role_name:

    stringlist

    Optional

    The role name list separated by the ';' symbol.

  • force:

    boolean

    Optional

    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