Get devices routing information (EA)

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

Note: This is an Early Availability API and is not found in the swagger.

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

Note: This API does not support management devices, groups of devices, nor user-defined groups.

Note: API currently does not support Juniper devices.

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

Request Method: POST

Request Query Parameters:

Element

Type

Description

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)

Request Body Parameters:

Element

Type

Description

deviceName

array of strings

List of device names: For example. ”[device1,device2]”​

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)

Request examples

curl -k --location --request POST 'https://<machine host>/afa/api/v1/interfaces/getRoutingInformation/?pageNumber=0&pageSize=1' --header 'Cookie: PHPSESSID= <sessionID>;' --header 'Content-Type: application/json' -d '[<deviceName1>,<deviceName2>]'

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"
		}
	]
}