Retrieve IP blacklist entry or whitelist entry.
GET
/show
Path parameters
-
access_tokenstring
required
token to be passed as a header -
idinteger
required
The unique id of the IP blacklist entry or whitelist entry.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/ip_filter/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
expires_timestring
IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
ipstring
IP rule's IP V4 address. -
descriptionstring
Remarks for the IP rule. -
idinteger
The unique id of the IP blacklist entry or whitelist entry. -
typestring
IP rule's type. -
maskstring
IP rule's IP mask.
Sample Response
{}
Destroy an IP blacklist entry or whitelist entry.
POST
/destroy
Destroy a certain IP blacklist entry or whitelist entry.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
idinteger
required
The unique id of the IP blacklist entry or whitelist entry.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/ip_filter/destroy \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"id": 123
}'
Responses
200
Successful operation
400
Invalid rule ID supplied.
Sample Response
Update IP blacklist entry or whitelist entry
POST
/update
Update IP blacklist entry or whitelist entry that already exists.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
expires_timestring
required
IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
maskstring
required
IP rule's IP mask. -
descriptionstring
required
Remarks for the IP rule. -
ipstring
required
IP rule's IP V4 address. -
typestring
required
IP rule's type. -
idinteger
required
The unique id of the IP blacklist entry or whitelist entry.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/ip_filter/update \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"mask": "255.255.255.0",
"id": 123,
"ip": "192.168.1.1"
}'
Responses
200
Successful operation
Sample Response
Add a new IP blacklist entry or whitelist entry to the system.
POST
/create
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
expires_timestring
required
IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
ipstring
required
IP rule's IP V4 address. -
descriptionstring
required
Remarks for the IP rule. -
typestring
required
IP rule's type. -
maskstring
required
IP rule's IP mask.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/ip_filter/create \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"ip": "192.168.1.1",
"mask": "255.255.255.0"
}'
Responses
200
Created blacklist entry or whitelist entry.
application/json
-
idinteger
The unique id of the IP blacklist entry or whitelist entry.
Sample Response
{
"id": 123
}
Retrieve a collection of IP blacklist entries or whitelist entries.
GET
/list
Retrieve a collection of IP blacklist entries or whitelist entries.
Path parameters
-
access_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
optional
Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/ip_filter/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesizeinteger
-
countinteger
-
paginationinteger
-
ip_filtersarray
Show child attributes -
sort_bystring
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}