Ip filters

List IP rules

get

Retrieve a collection of IP blacklist entries or whitelist entries.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200

OK

application/json
get
/ip_filters
GET /api/ip_filters HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "cidr": "text",
      "target": "ACCEPT",
      "expire_at": "2017-07-21T17:32:28Z",
      "description": "text"
    }
  ]
}

Create an IP rule

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
cidrstringRequired

The CIDR notation IP address and prefix length, like "192.0.2.0/24" or "2001:db8::/32", as defined in RFC 4632 and RFC 4291.

targetstring · enumRequired

IP rule's target:

  • ACCEPT: An accepted rule.
  • DENY: A rejection rule.
Possible values:
expire_atall ofOptional

IP rule's expire time.

string · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
descriptionstring · max: 255Optional

Remarks for the IP rule.

Responses
200

OK

application/json
post
/ip_filters
POST /api/ip_filters HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "cidr": "text",
  "target": "ACCEPT",
  "expire_at": "2017-07-21T17:32:28Z",
  "description": "text"
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve an IP rule

get

Retrieve IP blacklist entry or whitelist entry.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idall ofRequired

The unique ID of IP rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
get
/ip_filters/{id}
GET /api/ip_filters/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "cidr": "text",
  "target": "ACCEPT",
  "expire_at": "2017-07-21T17:32:28Z",
  "description": "text"
}

Update an IP rule

post

Update IP blacklist entry or whitelist entry that already exists.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idall ofRequired

The unique ID of IP rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
cidrstringOptional

The CIDR notation IP address and prefix length, like "192.0.2.0/24" or "2001:db8::/32", as defined in RFC 4632 and RFC 4291.

targetstring · enumOptional

IP rule's target:

  • ACCEPT: An accepted rule.
  • DENY: A rejection rule.
Possible values:
expire_atall ofOptional

IP rule's expire time.

string · date_timeOptional

The RFC 3339 format is defined by The date_time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Example: 2017-07-21T17:32:28Z
descriptionstring · max: 255Optional

Remarks for the IP rule.

Responses
200

OK

No content

post
/ip_filters/{id}
POST /api/ip_filters/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "cidr": "text",
  "target": "ACCEPT",
  "expire_at": "2017-07-21T17:32:28Z",
  "description": "text"
}

No content