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
authorized_ip:
string
The authorized IP4 or network
allowed:
boolean
OptionalDefaults on: trueSet false to add the IP to the blacklist
description:
string
OptionalThe IP address description
Returns
result:
number
1
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
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
allowed:
boolean
OptionalSet 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
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
authorized_ip:
string
OptionalThe authorized IP4 or network to filter
allowed:
boolean
OptionalThe allowed flag 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
offset:
number
OptionalDefaults on: 0The first N records will be skipped in the output
description:
string
OptionalThe IP address description
Returns
result:
total_count:
number
The total found network count
count:
number
The returned network count
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
result:
boolean
True if IP is allowed
authorized_ip:
string
OptionalThe matched authorized IP or network (if found)