Policy Service (2.7.0)

Download OpenAPI specification:Download

This is the spec that defines the APIs provided by the Policy Service to configure Prefix-list, route-maps data

Health

getHealth

Get the health of the policy service.

Responses

Response samples

Content type
application/json
{
  • "Service": "string",
  • "MessageBus": "string"
}

PrefixList

getPrefixList

Get prefix list details by type for given device IP address list

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Prefix-List

createPrefixList

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "prefix-list-name": "prefixlist_1",
  • "prefix-list-type": "ipv4",
  • "prefix-list-rules": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "prefixlist_v4",
  • "type": "ipv4",
  • "rules": [
    ]
}

updatePrefixList

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "prefix-list-name": "prefixlist_1",
  • "prefix-list-type": "ipv4",
  • "operation": "add-device",
  • "device-ips": "10.20.246.1",
  • "prefix-list-rules": [
    ]
}

Response samples

Content type
application/json
{
  • "prefixlist_result": {
    },
  • "device_result": {
    }
}

deletePrefixList

Delete an existing prefix list by type and name

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "prefixlist_result": {
    },
  • "device_result": {
    }
}

RouteMap

getRouteMap

Get routemap details for given device IP address list

query Parameters
device_ips
Array of strings >= 0 items unique

IP addresses of the devices

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

createRouteMap

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "name": "routemap_1",
  • "rules": {
    }
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

updateRouteMap

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "name": "routemap_1",
  • "seq": 10,
  • "operation": "add-device",
  • "action": "permit",
  • "device-ips": "10.20.246.1"
}

Response samples

Content type
application/json
{
  • "routemap_result": {
    },
  • "device_result": {
    }
}

deleteRouteMap

Delete an existing route map by name and sequence numbers

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "routemap_result": {
    },
  • "device_result": {
    }
}

RouteMapMatch

createRouteMapMatch

Request Body schema: application/json

Add a match criteria under a route map

required
object (RouteMapKeyInfo)
required
object (RouteMapMatches)

Route map match criterias

Responses

Request samples

Content type
application/json
{
  • "key-info": {
    },
  • "matches": {
    }
}

Response samples

Content type
application/json
{
  • "routemap_result": {
    },
  • "device_result": {
    }
}

deleteRouteMapMatch

Delete an existing route map match

Request Body schema: application/json

Delete a match criteria under a route map

object (RouteMapKeyInfo)
object (RouteMapMatches)

Route map match criterias

Responses

Request samples

Content type
application/json
{
  • "key-info": {
    },
  • "matches": {
    }
}

Response samples

Content type
application/json
{
  • "routemap_result": {
    },
  • "device_result": {
    }
}

Debug

deviceConfigDriftReconcile

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.

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "mgmt-ip": "10.10.10.10",
  • "reconciliation-status": [
    ],
  • "config-drift": {
    }
}

Trouble Shooting

GetRunningConfig

Get the list of all CLIs in Running Config

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}