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_active:

    boolean

    Optional
    Defaults on:  true

    Whether the admin role is enabled. If false the allowed and denied entries have no affect

  • admin_role_name:

    string

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

  • allowed_entries:

    stringlist

    Optional

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

  • denied_entries:

    stringlist

    Optional

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

  • like_admin_role_id:

    intlist

    Optional

    The admin role ID list separated by semicolons (;). 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)

Returns

  • admin_role_id:

    number

    The new admin role ID

  • result:

    number

    1

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 semicolons (;). 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

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_active:

    boolean

    Optional

    Whether the admin role is enabled to filter

  • admin_role_id:

    number

    Optional

    The admin role ID to filter

  • admin_role_name:

    string

    Optional

    The admin role name part to filter

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • excluded_admin_user_id:

    intlist

    Optional

    Not attached admin user ID list separated by semicolons (;). 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

  • included_admin_user_id:

    intlist

    Optional

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

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records are skipped in the output

  • showing_admin_user_id:

    number

    Optional

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

  • with_account_roles:

    boolean

    Optional
    Defaults on:  true

    Whether to include the account roles

  • with_entries:

    boolean

    Optional
    Defaults on:  false

    Whether to get the permissions

  • with_parent_roles:

    boolean

    Optional
    Defaults on:  true

    Whether to include the parent roles

Returns

  • count:

    number

    The returned admin role count

  • total_count:

    number

    The total found 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

SetAdminRoleInfo

Copy URL

Edits the specified admin role.

SetAdminRoleInfo example

SetAdminRoleInfo example

Allow the all permissions except the DelUser and DelApplication.

Parameters

  • admin_role_active:

    boolean

    Optional

    Whether the admin role is enabled. If false the allowed and denied entries have no affect

  • 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

  • allowed_entries:

    stringlist

    Optional

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

  • denied_entries:

    stringlist

    Optional

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

  • 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

  • like_admin_role_id:

    intlist

    Optional

    The admin role ID list separated by semicolons (;). Use the 'all' value to select all admin roles. The list specifies the roles from which the allowed_entries and denied_entries are 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 are merged

  • new_admin_role_name:

    string

    Optional

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

Returns

  • result:

    number

    1