Update IP blacklist entry or whitelist entry

POST /update
Update IP blacklist entry or whitelist entry that already exists.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • expires_time

    string

    required

    IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

    format : date-time

  • id

    string

    required

    IP rule's IP V4 address.
  • type

    string

    required

    IP rule's type.

    enum : ['NONE', 'PERMANENTLY', 'TIME_EFFICIENT', 'PERMIT']

  • ip

    string

    required

    IP rule's IP V4 address.
  • mask

    string

    required

    IP rule's IP mask.
  • description

    string

    required

    Remarks for the IP rule.

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 '{
    "ip": "192.168.1.1",
    "id": "192.168.1.1",
    "mask": "255.255.255.0"
}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Retrieve IP blacklist entry or whitelist entry.

GET /show
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The unique id of the IP blacklist entry or whitelist entry.

    format : int64

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_time

    string

    IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

    format : date-time

  • id

    integer

    The unique id of the IP blacklist entry or whitelist entry.

    format : int64

  • type

    string

    IP rule's type.

    enum : ['NONE', 'PERMANENTLY', 'TIME_EFFICIENT', 'PERMIT']

  • ip

    string

    IP rule's IP V4 address.
  • mask

    string

    IP rule's IP mask.
  • description

    string

    Remarks for the IP rule.

Sample Response

                      
{}
                      
                    

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_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    optional

    Default value will be used when user does not specify value for this field.

    enum : ['DEFAULT', 'OPTIONAL']

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
  • sort_by

    string

  • pagesize

    integer

  • pagination

    integer

  • ip_filters

    array

    Show child attributes
  • count

    integer

Sample Response

                      
{
    "sort_by": "DEFAULT",
    "pagesize": 10,
    "pagination": 8,
    "count": 100
}
                      
                    

Destroy an IP blacklist entry or whitelist entry.

POST /destroy
Destroy a certain IP blacklist entry or whitelist entry.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The unique id of the IP blacklist entry or whitelist entry.

    format : int64

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

                      
                      
                    

Add a new IP blacklist entry or whitelist entry to the system.

POST /create
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    IP rule's type.

    enum : ['NONE', 'PERMANENTLY', 'TIME_EFFICIENT', 'PERMIT']

  • ip

    string

    required

    IP rule's IP V4 address.
  • mask

    string

    required

    IP rule's IP mask.
  • description

    string

    required

    Remarks for the IP rule.
  • expires_time

    string

    required

    IP rule's expires time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

    format : date-time

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
  • id

    integer

    The unique id of the IP blacklist entry or whitelist entry.

    format : int64

Sample Response

                      
{
    "id": 123
}