SIGN UP
Navigation

Managing Admin Roles

Methods

Adds a new admin role.

Parameters

  • Follow link for authentication parameter names and details.

  • admin_role_name:

    string

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

  • admin_role_active:

    booleanDefaults to true

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

  • like_admin_role_id:

    string

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

  • like_admin_role_name:

    string

    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:

    string

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

  • denied_entries:

    string

    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.

Examples

request:

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

https://api.voximplant.com/platform_api/AddAdminRole/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&admin_role_name=read_only&allowed_entries=GetAccountInfo;GetCallHistory

response:

{
    "result": 1,
    "admin_role_id": 10
}

Deletes the specified admin role.

Parameters

  • Follow link for authentication parameter names and details.

  • admin_role_id:

    string

    The admin role ID list separated by the ';' symbol or the 'all' value.

  • admin_role_name:

    string

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

Returns

  • result:

    number

    1

Examples

request:

Delete the admin role.

https://api.voximplant.com/platform_api/DelAdminRole/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&admin_role_id=10

response:

Success

{
    "result": 1
}

Gets the admin roles.

Parameters

  • Follow link for authentication parameter names and details.

  • admin_role_id:

    number

    The admin role ID to filter.

  • admin_role_name:

    string

    The admin role name part to filter.

  • admin_role_active:

    boolean

    The admin role active flag to filter.

  • with_entries:

    booleanDefaults to false

    Set true to get the permissions.

  • with_account_roles:

    booleanDefaults to true

    Set false to omit the account roles.

  • with_parent_roles:

    booleanDefaults to true

    Set false to omit the parent roles.

  • with_system_roles:

    booleanDefaults to true

    Set false to omit the system roles.

  • included_admin_user_id:

    string

    The attached admin user ID list separated by the ';' symbol or the 'all' value.

  • excluded_admin_user_id:

    string

    The not attached admin user ID list separated by the ';' symbol or the 'all' value.

  • full_admin_users_matching:

    stringDefaults to false

    Set false to get roles with partial admin user list matching.

  • showing_admin_user_id:

    number

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

  • count:

    numberDefaults to 20

    The max returning record count.

  • offset:

    numberDefaults to 0

    The first N records will be skipped in the output.

Returns

  • result:

    [ AdminRoleType ]
  • total_count:

    number

    The total found admin role count.

  • count:

    number

    The returned admin role count.

Examples

request:

Get two admin roles attached to the admin_user_id=22.

https://api.voximplant.com/platform_api/GetAdminRoles/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&with_entries=true&showing_admin_user_id=11&included_admin_user_id=22&count=2

response:

{
    "count": 2,
    "result": [
        {
            "modified": "2014-12-05 10:27:30",
            "admin_users": [],
            "system_role": false,
            "admin_role_id": 10,
            "denied_entries": [],
            "admin_role_name": "read_only",
            "allowed_entries": [
                "GetAccountInfo",
                "GetCallHistory"
            ],
            "admin_role_active": true
        },
        {
            "modified": "2014-12-01 01:06:35",
            "admin_users": [
                {
                    "admin_user_id": 11
                }
            ],
            "system_role": true,
            "admin_role_id": 3,
            "denied_entries": [
                "GetScenarios",
                "DelScenario",
                "AddScenario",
                "SetScenarioInfo"
            ],
            "admin_role_name": "hide_scripts",
            "allowed_entries": [],
            "admin_role_active": true
        }
    ],
    "total_count": 2
}

Edits the specified admin role.

Parameters

  • Follow link for authentication parameter names and details.

  • 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

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

  • admin_role_active:

    boolean

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

  • entry_modification_mode:

    stringDefaults to set

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

  • allowed_entries:

    string

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

  • denied_entries:

    string

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

  • like_admin_role_id:

    string

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

  • like_admin_role_name:

    string

    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

Examples

request:

Allow the all permissions except the DelUser and DelApplication.

https://api.voximplant.com/platform_api/SetAdminRoleInfo/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&admin_role_id=1&entry_modification_mode=set&allowed_entries=all&denied_entries=DelUser;DelApplication

response:

Success

{
    "result": 1
}