Get devices routing information

Get routing information for a list of devices. Returns interfaces and routes from the routing information table. ​

Note: Returns only routes and interfaces from the routing information table.

Note: API currently does not support Juniper devices.

Resource Name: /afa/api/v1/interfaces/routingInformation/​

Request Method: GET

Request Query Parameters:

Element

Type

Description

entityTreeName

Mandatory

string

Tree name of the entity.

Note: To get the device tree name, use the 'GET /devices' method from the Devices Setup Resource Group in the 'AlgoSec_Firewall_Analyzer' spec

pageNumber
optional
Integer The page number to include in the response. Default value : 0 (Value 0 means first page).
pageSize
optional
Integer The number of results to include on each page in the response. Default value : 50 (devices)

cURL examples

curl -X GET "http://<localhost>/afa/api/v1/interfaces/routingInformation?entityTreeName=myEntity&pageNumber=0&pageSize=50" -H "accept: */*"

Response parameter

Name

Type

Description

routingInfoPerDevice array Array of routing information for each device
routes array Array of route objects
dest String Destination
mask String Subnet mask
gatewayIp String Gateway IP
sourceInterface String Source Interface
interfaces Array Array of interface objects
interfaceId Integer

Interface ID number

ip String IP address of interface
hwName String Physical interface name
logicalName String Internal interface internal name
vips Array of strings Virtual IPs
deviceName String Device name
totalPages Integer Total number of pages
pageNumber Integer Page number
pageSize Integer Number of rows on a page

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized (session of connection to the entire machine is expired)

Response examples

{
	"totalPages": 1,
	"totalElements": 1,
	"pageNumber": 0,
	"pageSize": 1,
	"routingInfoPerDevice": [
		{
			"routes": [
				{
					"dest": "192.168.29.0",
					"mask": "255.255.255.0",
					"gatewayIp": "192.168.29.5",
					"sourceInterface": null
				},
				{
					"dest": "192.168.29.4",
					"mask": "255.255.255.252",
					"gatewayIp": "192.168.29.6",
					"sourceInterface": null
				},
				{
					"dest": "4.1.1.0",
					"mask": "255.255.255.0",
					"gatewayIp": "192.168.29.5",
					"sourceInterface": null
				},
				{
					"dest": "10.20.0.0",
					"mask": "255.255.0.0",
					"gatewayIp": "10.20.169.76",
					"sourceInterface": null
				},
				{
					"dest": "195.1.1.0",
					"mask": "255.255.255.0",
					"gatewayIp": "195.1.1.246",
					"sourceInterface": null
				},
				{
					"dest": "0.0.0.0",
					"mask": "0.0.0.0",
					"gatewayIp": "10.20.0.1",
					"sourceInterface": null
				}
			],
			"interfaces": [
				{
					"interfaceId": 11317,
					"ip": "192.168.29.6",
					"hwName": "eth2.3",
					"logicalName": "if_1",
					"vips": []
				},
				{
					"interfaceId": 11315,
					"ip": "10.20.169.76",
					"hwName": "eth0",
					"logicalName": "if_0",
					"vips": []
				},
				{
					"interfaceId": 11316,
					"ip": "195.1.1.246",
					"hwName": "eth1.502",
					"logicalName": "if_2",
					"vips": []
				}
			],
			"deviceName": "TrafficLogsGW_2"
		}
	]
}