Find route between source and destination
Finds all Firewalls in Path (FIP) route between source and destination, if exists.
Required permissions
To perform this request, you must have access to all the firewalls that are relevant for your query results path. Queries will fail if the query goes through a non-permitted device or group of devices.
Resource Name:
Request Method: POST
Request URL Parameters:
|
Element |
Type |
Description |
|---|---|---|
| Source
Mandatory |
List of strings | List of source IPs for the routing query. Multiple values are separated by commas (,). Example: 192.168.2.3,10.56.90.0-10.56.90.255 |
| Destination
Mandatory |
List of strings | List of destination IPs for the routing query. Multiple values are separated by commas (,). Example: 192.168.2.3,10.56.90.0-10.56.90.255 |
Request example (JSON)
{
"source": "1.1.1.1-1.1.1.10,1.1.1.20",
"destination": "10.20.30.40,10.20.30.50-10.20.30.60"
}
Request cURL example
curl -X 'POST' \
'https://<localhost>/afa/api/v1/query/routing' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"source": "1.1.1.1-1.1.1.10,1.1.1.20",
"destination": "10.20.30.40,10.20.30.50-10.20.30.60"
}'
Response
|
Code |
Description |
|---|---|
| 200 |
Operation completed successfully |
|
400 |
Validation error. Illegal argument. |
|
401 |
Unauthorized |
| 403 | The session does not have permissions |
| 404 | Not Found |
|
423 |
Locked |
| 429 | Too Many Requests |
| 500 | Internal server error. Query failed, check logs for more information. |
| 503 | Service Unavailable |
Response parameters:
| Element | Type | Description |
|---|---|---|
| paths | array of Paths objects | A list of path objects returned in the response. |
| deviceName | String | The device's tree name |
| displayName | String | User-visible or friendly device name. |
| brandName | String | Vendor/brand of the device. |
| destinationNatIp | String | Destination NAT address, if NAT is applied. Empty string if not applicable. |
| sourceNat | Boolean | Indicates whether source NAT is applied. |
| destinationNat | Boolean | Indicates whether destination NAT is applied. |
| message | string |
Result of routing query |
Response example 200 Successful
{
"paths": [
[
{
"deviceName": "crcoftd4245mpn_1_crcoftd4245mpn_1",
"displayName": "crcoftd4245mpn-1_crcoftd4245mpn-1",
"brandName": "Cisco Firepower",
"destinationNatIp": "",
"sourceNat": false,
"destinationNat": false
}
]
],
"message": "The traffic is successfully routed"
}