1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

site

doc

blog

success stories

Network Lists

Edit on GitHub

Through the Network Lists API you can create, query or update Network Lists used in the Edge Firewall’s Rules Engine.

  1. Retrieving the list of Network Lists
  2. Retrieving data from a Network List
  3. Retrieving data from an Origin Shield - Network List
  4. Retrieving data from Tor Exit Nodes - Network List
  5. Creating a new Network List
  6. Overwriting a Network List

1. Retrieving the list of Network Lists

It returns the list of Network Lists.

GET /network_lists

Required permission: View Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3

Request Example

GET /network_lists 
Accept: application/json; version=3
Authorization: token ec6aabdc0b6bbeed826a36d8731630e36b6e3f22
Content-Type: application/json

Response Example


    {
    "count": 3,
    "total_pages": 1,
    "schema_version": 3,
    "links": {
        "previous": null,
        "next": null
    },
    "results": [
        {
            "id": 9,
            "last_editor": "products@azion.com",
            "last_modified": "2019-12-11T18:15:29.073687Z",
            "list_type": "ip_cidr",
            "name": "Azion IP"
        },
        {
            "id": 17,
            "last_editor": "products@azion.com",
            "last_modified": "2019-12-11T18:15:35.124016Z",
            "list_type": "asn",
            "name": "Azion ASN"
        },
        {
            "id": 20,
            "last_editor": "products@azion.com",
            "last_modified": "2019-12-11T18:14:10.514494Z",
            "list_type": "countries",
            "name": "Azion Country"
        }
    ]
}

2. Retrieving data from a Network List

It returns the details of a Network List. The information that is returned in this call refers to Network Lists that can be linked to one or more Rule Sets from Edge Firewall.

GET /network_lists/:id

Required permission: View Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3
:id
*required
ID of the network list to be queried. path number

Request Example

GET /network_lists/111
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5942

Response Example

Response for IP/CIDR type list:

{
    "results": {
        "last_editor": "products@azion.com",
        "last_modified": "2019-09-12T14:07:26.871995Z",
        "list_type": "ip_cidr",
        "name": "IP Blacklist - Azion Docs",
        "items_values": [
            "10.1.1.10/16",
            "192.168.0.1",
            "192.168.0.2/32"
        ]
    },
    "schema_version": 3
}

Response for a ASN type list:

{
    "results": {
        "last_editor": "RTM User Name",
        "last_modified": "2019-09-12T14:07:26.871995Z",
        "list_type": "asn",
        "name": "ASN List",
        "items_values": [
            1234,
            4321
        ]
    },
    "schema_version": 3
}

Response for a Countries type list:

{
    "results": {
        "last_editor": "RTM User Name",
        "last_modified": "2019-09-12T14:07:26.871995Z",
        "list_type": "countries",
        "name": "Countries List",
        "items_values": [
            "CN",
            "RU"
        ]
    },
    "schema_version": 3
}

3. Retrieving data from an Origin Shield - Network List

It returns the details of an Origin Shield Network List. The information that is returned in this call refers to Origin Shield Network Lists, which contains the list of all IPs in the security perimeter for your origin infrastructure.

GET /network_lists/187

Required permission: View Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3
:id
*required
ID of the Origin Shield Network List to be queried. path number

Request Example

GET /network_lists/187
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5942

Response Example

Response for IP/CIDR type list:

{
    "results": {
        "last_editor": "Azion",
        "last_modified": "2019-09-12T14:07:26.871995Z",
        "list_type": "ip_cidr",
        "name": " Azion Origin Shield",
        "items_values": [
            "149.56.116.123/32",
            "149.56.148.202/32",
            "151.80.204.60/30",
            "168.181.22.64/29",
            "169.239.132.192/28",
            "170.0.81.120/29"
        ]
    },
    "schema_version": 3
}

4. Retrieving data from Tor Exit Nodes - Network List

It returns details of the Tor Exit Nodes Network List. The information that is returned in this call refers to the Tor Exit Nodes Network List which contains the list of all IP’s that can be used in the Rules Engine in Edge Firewall, in order to prevent requests for these addresses from the list.

GET /network_lists/2

Required permission: View Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3
:id
*required
ID of the Tor Exit Nodes Network List to be queried. path number

Request Example

GET /network_lists/2
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5942

Response Example

Response for IP/CIDR type list:

{
    "results": {
        "last_editor": "Azion",
        "last_modified": "2019-09-12T14:07:26.871995Z",
        "list_type": "ip_cidr",
        "name": " Azion IP Tor Exit Nodes",
        "items_values": [
            "173.249.57.253",
            "176.10.104.240",
            "176.10.107.180",
            "176.10.99.200",
            "176.107.179.147",
            "176.107.187.151"
        ]
    },
    "schema_version": 3
}

5. Creating a new Network List

It enables you to create a new Network List.

POST /network_lists

Required permission: Edit Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3
Content-Type
*required
The type of encoding used in Body (application/json).

Example:
Content-Type: application/json
header string

Request Example

POST /network_lists
Accept: application/json; version=3
Authorization: token cf2078926f91a6e638af3f4a6977b505edfe5941
Content-Type: application/json
{
    "name": "Network List criada pela API",
    "items_values": [
    	   "192.168.0.1",
        "192.168.0.2/32",
        "10.1.1.10/16"
    ],
    "list_type": "ip_cidr"
}

Response Example

{
    "results": {
        "items_values": [
            "10.1.1.10/16",
            "192.168.0.1",
            "192.168.0.2/32"
        ],
        "name": "Network List criada pela API",
        "last_modified": "2019-12-11T18:28:35.349078Z",
        "list_type": "ip_cidr",
        "last_editor": "products@azion.com",
        "id": 85
    },
    "schema_version": 3
}

6. Overwriting a Network List

It overwrites all fields of a Network List, while preserving the id.

PUT /network_lists/:id

Required permission: Edit Network Lists

Parameter Description Type Type of Data
Authorization
*required
Token authentication previously created through the Token Creation endpoint header string
Accept
*required
Information about the return type and version header string;
application/json;version=3
Content-Type
*required
The type of encoding used in Body (application/json).

Example:
Content-Type: application/json
header string
:id

*required
ID of the Network List to be overwritten. path number

Request Example

PUT /network_lists/85
Accept: application/json; version=3
Authorization: token ec6aabdc0b6bbeed826a36d8731630e36b6e3f22
Content-Type: application/json

Request for IP/CIDR type list:

{
    "name": "Network List Modificada pela API",
    "items_values": [
    	"192.168.0.5",
        "192.168.0.2/32",
        "10.1.1.10/16"
    ],
    "list_type": "ip_cidr"
}

Request for a ASN type list:

{
    "items_values": [
    	   "1234",
        "4321"
    ],
    "name": "ASN - Azion Docs - Modificada pela API",
    "list_type": "asn"
}

Request for a Countries type list:

{
    "items_values": [
    	"BR",
    	"AG",
    	"US"
 ],
    "name": "Country Modificada pela API",
    "list_type": "countries"
}

Response Example

Response for IP/CIDR type list:

{
    "results": {
        "items_values": [
            "10.1.1.10/16",
            "192.168.0.2/32",
            "192.168.0.5"
        ],
        "name": "Network List Modificada pela API",
        "last_modified": "2019-12-11T18:31:41.780397Z",
        "list_type": "ip_cidr",
        "last_editor": "products@azion.com",
        "id": 85
    },
    "schema_version": 3
}

Response for a ASN type list:

{
    "results": {
        "items_values": [
            1234,
            4321
        ],
        "name": "ASN - Azion Docs - Modificada pela API",
        "last_modified": "2019-12-11T18:36:07.282729Z",
        "list_type": "asn",
        "last_editor": "products@azion.com",
        "id": 17
    },
    "schema_version": 3
}

Response for a Countries type list:

{
    "results": {
        "items_values": [
            "BR",
            "US",
            "AG"
        ],
        "name": "Country Modificada pela API",
        "last_modified": "2019-12-11T18:33:51.781496Z",
        "list_type": "countries",
        "last_editor": "products@azion.com",
        "id": 20
    },
    "schema_version": 3
}

Didn’t find what you were looking for? Open a ticket.