AuthorizedIPs
Methods
AddAuthorizedAccountIP
Adds a new authorized IP4 or network to the white/black list.
To call this method, make sure your service account has one of the following roles:
AddAuthorizedAccountIP example
Add the 92.255.220.0/24 network to the white list.
Parameters
allowed:
boolean
OptionalDefaults on: trueWhether to remove the IP from the blacklist
authorized_ip:
string
The authorized IP4 or network
description:
string
OptionalThe IP address description
Returns
result:
number
1
CheckAuthorizedAccountIP
Tests whether the IP4 is banned or allowed.
To call this method, make sure your service account has one of the following roles:
CheckAuthorizedAccountIP example
Parameters
authorized_ip:
string
The IP4 to test
Returns
authorized_ip:
string
OptionalThe matched authorized IP or network (if found)
result:
boolean
Whether the IP is allowed
DelAuthorizedAccountIP
Removes the authorized IP4 or network from the white/black list.
To call this method, make sure your service account has one of the following roles:
DelAuthorizedAccountIP example
Delete the 92.255.220.0/24 network from all the lists.
Parameters
allowed:
boolean
OptionalWhether 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
authorized_ip:
string
The authorized IP4 or network to remove. Set to 'all' to remove all items
contains_ip:
string
Specify the parameter to remove the networks that contains the particular IP4. Can be used instead of autharized_ip
Returns
result:
number
The removed network count
GetAuthorizedAccountIPs
Gets the authorized IP4 or network.
To call this method, make sure your service account has one of the following roles:
GetAuthorizedAccountIPs example
Show the all items.
Parameters
allowed:
boolean
OptionalWhether the IP is allowed
authorized_ip:
string
OptionalThe authorized IP4 or network to filter
contains_ip:
string
OptionalSpecify the parameter to filter the networks that contains the particular IP4
count:
number
OptionalDefaults on: 50The max returning record count
description:
string
OptionalThe IP address description
offset:
number
OptionalDefaults on: 0The first N records are skipped in the output
Returns
count:
number
The returned network count
result:
total_count:
number
The total found network count