Rate this page:

AdminRoles

Methods

AddAdminRole

Copy URL

Adds a new admin role.

AddAdminRole example

AddAdminRole example

Add a new admin role with the GetAccountInfo and GetCallHistory permissions.

Parameters

  • admin_role_name:

    string

    The admin role name. The length must be less than 50

  • admin_role_active:

    boolean

    Optional
    Defaults on:  true

    The admin role enable flag. If false the allowed and denied entries have no affect

  • like_admin_role_id:

    intlist

    Optional

    The admin role ID list separated by the ';' symbol. Use the 'all' value to select all admin roles. The list specifies the roles from which the new role automatically copies all permissions (allowed_entries and denied_entries)

  • like_admin_role_name:

    stringlist

    Optional

    The admin role name that can be used instead of like_admin_role_id. The name specifies a role from which the new role automatically copies all permissions (allowed_entries and denied_entries)

  • allowed_entries:

    stringlist

    Optional

    The list of allowed access entries separated by the ';' symbol (the API function names)

  • denied_entries:

    stringlist

    Optional

    The list of denied access entries separated by the ';' symbol (the API function names)

Returns

  • result:

    number

    1

  • admin_role_id:

    number

    The new admin role ID

DelAdminRole

Copy URL

Deletes the specified admin role.

DelAdminRole example

DelAdminRole example

Delete the admin role.

Parameters

  • admin_role_id:

    intlist

    The admin role ID list separated by the ';' symbol. Use the 'all' value to select all admin roles

  • admin_role_name:

    stringlist

    The admin role name to delete, can be used instead of admin_role_id

Returns

  • result:

    number

    1

SetAdminRoleInfo

Copy URL

Edits the specified admin role.

SetAdminRoleInfo example

SetAdminRoleInfo example

Allow the all permissions except the DelUser and DelApplication.

Parameters

  • admin_role_id:

    number

    The admin role to edit

  • admin_role_name:

    string

    The admin role to edit, can be used instead of admin_role_id

  • new_admin_role_name:

    string

    Optional

    The new admin role name. The length must be less than 50

  • admin_role_active:

    boolean

    Optional

    The admin role enable flag. If false the allowed and denied entries have no affect

  • entry_modification_mode:

    string

    Optional
    Defaults on:  set

    The modification mode of the permission lists (allowed_entries and denied_entries). The following values are possible: add, del, set

  • allowed_entries:

    stringlist

    Optional

    The list of allowed access entry changes separated by the ';' symbol (the API function names)

  • denied_entries:

    stringlist

    Optional

    The list of denied access entry changes separated by the ';' symbol (the API function names)

  • like_admin_role_id:

    intlist

    Optional

    The admin role ID list separated by the ';' symbol. Use the 'all' value to select all admin roles. The list specifies the roles from which the allowed_entries and denied_entries will be merged

  • like_admin_role_name:

    stringlist

    Optional

    The admin role name, can be used instead of like_admin_role_id. The name specifies a role from which the allowed_entries and denied_entries will be merged

Returns

  • result:

    number

    1

GetAdminRoles

Copy URL

Gets the admin roles.

GetAdminRoles example

GetAdminRoles example

Get two admin roles attached to the admin_user_id=22.

Parameters

  • admin_role_id:

    number

    Optional

    The admin role ID to filter

  • admin_role_name:

    string

    Optional

    The admin role name part to filter

  • admin_role_active:

    boolean

    Optional

    The admin role active flag to filter

  • with_entries:

    boolean

    Optional
    Defaults on:  false

    Set true to get the permissions

  • with_account_roles:

    boolean

    Optional
    Defaults on:  true

    Set false to omit the account roles

  • with_parent_roles:

    boolean

    Optional
    Defaults on:  true

    Set false to omit the parent roles

  • included_admin_user_id:

    intlist

    Optional

    The attached admin user ID list separated by the ';' symbol. Use the 'all' value to select all admin users

  • excluded_admin_user_id:

    intlist

    Optional

    Not attached admin user ID list separated by the ';' symbol. Use the 'all' value to select all admin users

  • full_admin_users_matching:

    string

    Optional
    Defaults on:  false

    Set false to get roles with partial admin user list matching

  • showing_admin_user_id:

    number

    Optional

    The admin user to show in the 'admin_users' field output

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records will be skipped in the output

Returns

  • total_count:

    number

    The total found admin role count

  • count:

    number

    The returned admin role count

GetAvailableAdminRoleEntries

Copy URL

Gets the all available admin role entries.

GetAvailableAdminRoleEntries example

GetAvailableAdminRoleEntries example

Get the all available admin role entries.

Returns

  • result:

    [string]

    Array of the admin role entries