Download OpenAPI specification:Download
This is the spec that defines the APIs provided by the Policy Service to configure Prefix-list, route-maps data
{- "Service": "string",
- "MessageBus": "string"
}
Get prefix list details by type for given device IP address list
type required | string Enum: "ipv4" "ipv6" Type of the prefix lists to retrieve |
device_ips | Array of strings >= 0 items unique IP addresses of the devices |
{- "items": [
- {
- "name": "prefixlist_1",
- "type": "ipv4",
- "rules": [
- {
- "seq": 10,
- "action": "permit",
- "prefix": "10.0.0.0/8",
- "ge": 16,
- "le": 24
}, - {
- "seq": 20,
- "action": "deny",
- "prefix": "50.0.0.0/8"
}
], - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - {
- "name": "prefixlist_2",
- "type": "ipv4",
- "rules": [
- {
- "seq": 100,
- "action": "permit",
- "prefix": "100.0.0.0/8",
- "ge": 16,
- "le": 24
}, - {
- "seq": 200,
- "action": "deny",
- "prefix": "500.0.0.0/8"
}
], - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}
]
}
Create a prefix list
prefix-list-name | string Name of the prefix list |
prefix-list-type | string Enum: "ipv4" "ipv6" Type of the prefix lists to create |
Array of objects (PrefixListRule) unique rules to be added to prefix list |
{- "prefix-list-name": "prefixlist_1",
- "prefix-list-type": "ipv4",
- "prefix-list-rules": [
- {
- "prefix-list-name": "prefixlist_1",
- "prefix-list-type": "ipv4",
- "prefix-list-rules": [
- {
- "seq": 10,
- "action": "permit",
- "prefix": "10.0.0.0/8",
- "ge": 16,
- "le": 24
}, - {
- "seq": 20,
- "action": "deny",
- "prefix": "50.0.0.0/8"
}
]
}
]
}
{- "name": "prefixlist_v4",
- "type": "ipv4",
- "rules": [
- {
- "rule-info": {
- "seq": 10,
- "action": "permit",
- "prefix": "10.0.0.0/8",
- "ge": 16,
- "le": 24
}, - "device_state": {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}
}, - {
- "rule-info": {
- "seq": 20,
- "action": "permit",
- "prefix": "11.1.0.0/8",
- "ge": 16,
- "le": 24
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}
]
}
Update an existing prefix list
prefix-list-name | string Name of the prefix list |
prefix-list-type | string Enum: "ipv4" "ipv6" Type of the prefix lists to create |
operation | string Enum: "add-rule" "remove-rule" "add-device" "remove-device" Update operation to be performed on prefix list |
device-ips | Array of strings IP addresses of the devices |
Array of objects (PrefixListRule) unique rules to be added to prefix list |
{- "prefix-list-name": "prefixlist_1",
- "prefix-list-type": "ipv4",
- "operation": "add-device",
- "device-ips": "10.20.246.1",
- "prefix-list-rules": [
- {
- "prefix-list-name": "prefixlist_1",
- "prefix-list-type": "ipv4",
- "operation": "add-device",
- "device_ips": "10.20.246.1"
}
]
}
{- "prefixlist_result": {
- "name": "prefixlist_v4",
- "type": "ipv4",
- "rules": [
- {
- "seq": 10,
- "action": "permit",
- "prefix": "10.0.0.0/8",
- "ge": 16,
- "le": 24
}, - {
- "seq": 20,
- "action": "deny",
- "prefix": "50.0.0.0/8"
}
], - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Delete an existing prefix list by type and name
name required | string Name of the prefix-list to be deleted |
type required | string Enum: "ipv4" "ipv6" Type of the prefix-list to be deleted |
{- "prefixlist_result": {
- "name": "prefixlist_v4",
- "type": "ipv4",
- "rules": [
- {
- "seq": 10,
- "action": "permit",
- "prefix": "10.0.0.0/8",
- "ge": 16,
- "le": 24
}, - {
- "seq": 20,
- "action": "deny",
- "prefix": "50.0.0.0/8"
}
], - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Get routemap details for given device IP address list
device_ips | Array of strings >= 0 items unique IP addresses of the devices |
routemap_name | Array of strings >= 0 items unique Route Map name |
{- "items": [
- {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - {
- "key-info": {
- "name": "routemap_2",
- "seq": 20,
- "action": "deny"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}
]
}
Create a route map
name required | string Name of the route map |
required | Array of objects (RouteMapRule) non-empty unique Rule information of route map - contains sequence number and action |
{- "name": "routemap_1",
- "rules": {
- "rules": [
- {
- "seq": 10,
- "action": "permit"
}, - {
- "seq": 20,
- "action": "deny"
}
]
}
}
{- "routemap_result": {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Update an existing route map
name | string Name of the route map |
seq | integer sequence number of route map |
operation | string Enum: "add-device" "remove-device" "update-action" Update operation to be performed on route map |
action | string Enum: "permit" "deny" Action of the route map |
device-ips | Array of strings IP addresses of the devices |
{- "name": "routemap_1",
- "seq": 10,
- "operation": "add-device",
- "action": "permit",
- "device-ips": "10.20.246.1"
}
{- "routemap_result": {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Delete an existing route map by name and sequence numbers
name required | string Name of the route map to be deleted |
sequence_numbers required | Array of strings non-empty unique sequence numbers of the route map to be deleted |
{- "routemap_result": {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Add a match criteria under a route map
required | object (RouteMapKeyInfo) |
required | object (RouteMapMatches) Route map match criterias |
{- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}
}
{- "routemap_result": {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
Delete an existing route map match
Delete a match criteria under a route map
object (RouteMapKeyInfo) | |
object (RouteMapMatches) Route map match criterias |
{- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}
}
{- "routemap_result": {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "matches": {
- "match-ip-prefix-list": {
- "prefix-list-name": "prefixlist_v4"
}
}, - "device_states": [
- {
- "device_ip": "10.20.246.1",
- "app_state": "cfg-in-sync"
}, - {
- "device_ip": "10.20.246.2",
- "app_state": "cfg-refreshed"
}
]
}, - "device_result": {
- "ip_address": "10.25.25.100",
- "result": "Failed",
- "reason": "Connection to device failed"
}
}
This API helps user to generate the config-drift between efa intended and device configuration. If reconcile flag is set then drifted configuration will be reconciled on the device.
ip_address required | string IP Addresses of the device for which config drift will be generated. |
reconcile required | boolean Default: false Value true implies efa drift with devices will be reconciled |
{- "mgmt-ip": "10.10.10.10",
- "reconciliation-status": [
- {
- "config-type": "PrefixListConfig",
- "status": "Success",
- "error-list": [
- {
- "message": "Specified prefix list does not exist",
- "code": 101
}
]
}
], - "config-drift": {
- "PrefixListConfig": [
- {
- "name": "ipprefixlist_v4",
- "type": "ipv4",
- "seq": 10,
- "app_state": "cfg-refreshed",
- "app_state_detail": [
- {
- "property_name": "Prefix list rule",
- "property_app_state": "cfg-refreshed"
}
]
}
], - "RouteMapConfig": [
- {
- "key-info": {
- "name": "routemap_1",
- "seq": 10,
- "action": "permit"
}, - "app_state": "cfg-refreshed",
- "app_state_detail": [
- {
- "property_name": "Prefix list rule",
- "property_app_state": "cfg-refreshed"
}
]
}
]
}
}
{- "items": [
- "string"
]
}
Get the list of all the previous executions
limit required | integer Default: 10 Limit the number of executions that will be sent in the response. Default is 10 |
status | string Default: "all" Filter the executions based on the status(failed/succeeded/all) |
{- "items": [
- {
- "start_time": "2000-01-23T04:56:07.000Z",
- "end_time": "2000-01-23T04:56:07.000Z",
- "id": "id",
- "command": "configure add",
- "status": "configure add"
}, - {
- "start_time": "2000-01-23T04:56:07.000Z",
- "end_time": "2000-01-23T04:56:07.000Z",
- "id": "id",
- "command": "configure add",
- "status": "configure add"
}
]
}