ВОЙТИ

Authorized IPs

Methods

AddAuthorizedAccountIP

Adds a new authorized IP4 or network to the white/black list.

Parameters

  • Follow link for authentication parameter names and details.

  • authorized_ip:

    string

    The authorized IP4 or network.

  • allowed:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to add the IP to the blacklist.

Returns

  • result:

    number

    1

Примеры

запрос:

Add the 92.255.220.0/24 network to the white list.

https://api.voximplant.com/platform_api/AddAuthorizedAccountIP/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&authorized_ip=92.255.220.0%2F24

ответ:

Add the 92.255.220.0/24 network to the white list.

{
    "result": 1
}

CheckAuthorizedAccountIP

Tests whether the IP4 is banned or allowed.

Parameters

  • Follow link for authentication parameter names and details.

  • authorized_ip:

    string

    The IP4 to test.

Returns

  • result:

    boolean

    True if IP is allowed.

  • authorized_ip:

    string

    The matched authorized IP or network (if found).

Примеры

запрос:

https://api.voximplant.com/platform_api/CheckAuthorizedAccountIP/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&authorized_ip=92.255.220.0%2F24

ответ:

{
    "result": true,
    "authorized_ip": "92.255.0.0\/16"
}

{
    "result": false,
    "authorized_ip": "92.255.0.0\/16"
}

{
    "result": false
}

DelAuthorizedAccountIP

Removes the authorized IP4 or network from the white/black list.

Parameters

  • Follow link for authentication parameter names and details.

  • authorized_ip:

    string

    The authorized IP4 or network to remove. Set to 'all' to remove all items.

  • contains_ip:

    string

    Can be used instead of autharized_ip. Specify the parameter to remove the networks that contains the particular IP4.

  • allowed:

    boolean
    OPTIONAL

    Set true to remove the network from the white list. Set false to remove the network from the black list. Omit the parameter to remove the network from all lists.

Returns

  • result:

    number

    The removed network count.

Примеры

запрос:

Delete the 92.255.220.0/24 network from all the lists.

https://api.voximplant.com/platform_api/DelAuthorizedAccountIP/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&authorized_ip=92.255.220.0%2F24

ответ:

Delete the 92.255.220.0/24 network from all the lists.

{
    "result": 1
}

GetAuthorizedAccountIPs

Gets the authorized IP4 or network.

Parameters

  • Follow link for authentication parameter names and details.

  • authorized_ip:

    string
    OPTIONAL

    The authorized IP4 or network to filter.

  • allowed:

    boolean
    OPTIONAL

    The allowed flag to filter.

  • contains_ip:

    string
    OPTIONAL

    Specify the parameter to filter the networks that contains the particular IP4.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  50

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

Returns

  • total_count:

    number

    The total found network count.

  • count:

    number

    The returned network count.

Примеры

запрос:

Show the all items.

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

ответ:

Show the all items.

{
    "count": 2,
    "result": [
        {
            "allowed": "true",
            "created": "2015-02-01 20:10:15",
            "authorized_ip": "92.255.220.0\/24"
        },
        {
            "allowed": "false",
            "created": "2015-02-01 20:10:17",
            "authorized_ip": "92.255.220.10"
        }
    ],
    "total_count": 2
}