Identify missing routers

The following requests allow you to identify routers in the AFA graphic network map that should be defined as devices in AFA.

For more details, see Manage the map.

Run the Topology Advisor

The execute method runs the Topology Advisor. This tool searches for routers missing from the AFA graphic network map.

The input will be the network's SNMP key, internal networks, external networks, and the maximum number of queries the tool should run. The output is a status message. To retrieve the results, Retrieve suggested routers results.

Note: The execute method may take several minutes to complete, depending on the number of queries.

Resource Name: /ms-mapDiagnostics/v1/api/mapCompleteness/execute*/

Request Method: POST

Authentication: Cookie with session ID.

Request Body Parameters:

Element

Type

Description

maxQueriesOptional

Integer

The maximum number of paths to query.

By default, the maximum number of queries is 400.

snmpKeyOptional

String

The network's SNMP key.

This is used to retrieve the names of the routers. If the DNS lookup fails and the SNMP key is not provided, the results will only provide the router's IP address.

internalNetworksOptional

A list of subnets (CIDR format).

All of the network's internal subnets.

In order to determine the default values for your environment, seeRetrieve Topology Advisor default values.

externalNetworksOptional

A list of subnets (CIDR format).

All of the external subnets that should be reachable from each of the network's internal subnets.

In order to determine the default values for your environment, see Retrieve Topology Advisor default values.

Response:

Element

Type

Description

status

String

A message which indicates success or a reason for failure.

Request Body Example

{   "maxQueries": 400,  "snmpKey": "alkfaklfjk34mk4h3j4nj3k4hy2n54j",  "internalNetworks": ["10.0.0.0/8","192.168.0.0/16","172.16.0.0/12"],  "externalNetworks": ["8.8.8.8"] }

Response example

{   "status": success,}

Back to top

Retrieve suggested routers results

The missingStubRouters request provides the results of the execute request: a list of routers missing from the graphic network map.

The input will be the page number you want to retrieve. You can optionally filter the result that you want to retrieve by providing the name of a router, the name of the closest device, or a relevant subnet. The output is a list of routers.

Note: You must wait for the execute request to complete before retrieving the missing routers with the missingStubRouters request.

Resource Name: ms-mapDiagnostics/v1/api/mapCompleteness/missingStubRouters

Request Method: GET

Authentication: Cookie with session ID.

Request URL Parameters:

Element

Type

Description

form

String

A URL encoded JSON object with the following properties.

Properties:

Element

Type

Description

pageNumberMandatory

Integer

The page number for the page of results to return in the response.

byStubNameOptional

String

The name of router to return in the response.

byClosestDeviceNameOptional

String

The name of the closest device to the routers to return in the results.

byNetworkOptional

String

A subnet (in CIDR format) that is relevant to the routers to return in the results.

Response:

Element

Type

Description

totalStubs

Integer

The number of routers returned in the response.

pageNumber

Integer

The page number of the results returned in the response.

stubs

A list of stub objects.

A list of routers. See Stub Type (see Stub Type ).

score

Integer

The score of suggested routers.

Request Body Example

{"pageNumber" : 1,"byStubName" : "10.110.15","byClosetDeviceName":"10.110.151.1","byNetwork":"10.110.15"}

Response example

{

"totalStubs":1,

"pageNumber":1,

"stubs":[

{

"id":123,

"name":"10.110.151.10",

"stubs":[

{

"id":123,

"ip":{

"id":10,

"minIp":175019786,

"maxIp":175019786,

"display":"10.110.151.10",

"displayRange":"10.110.151.10",

"optimalDisplay":[

"10.110.151.10"

],

"singleIP":true,

"cidr":true,

"any":false

},

"closestDevices":[

{

"id":176,

"brand":"junos",

"name":"10.20.151.1"

}

]

}

],

"missingInPaths":42

}

],

"score":18

}

Back to top

Retrieve the last run configuration

The lastExecution request provides the parameters that were used the last time the Topology Advisor was executed.

Resource Name: ms-mapDiagnostics/v1/api/mapCompleteness/lastExecution*/

Request Method: GET

Authentication: Cookie with session ID.

Response:

Element

Type

Description

score

Integer

The score of suggested routers.

executionTime

Integer

The timestamp for the last execution.

queries

Integer

The number of queries that were run.

snmpKey

String

The network's SNMP key.

internalNetworks

A list of ip objects

The internal subnets that were used for the execution.

externalNetworks

A list of ip objects

The external subnets that were used for the execution.

status

String

The status of the last execution.

progress

Boolean

The last execution's progress.

Response example

{

"score": 43,

"executionTime": 1524471616454,

"queries": 400,

"snmpKey": "askjdaksdjask",

"internalNetworks": [

{

"id": 5,

"minIp": 3232235777,

"maxIp": 3232235777,

"display": "192.168.1.1",

"displayRange": "192.168.1.1",

"optimalDisplay": [

"192.168.1.1"

],

"singleIP": true,

"cidr": true,

"any": false

},

{

"id": 2,

"minIp": 167772160,

"maxIp": 184549375,

"display": "10.0.0.0/8",

"displayRange": "10.0.0.0-10.255.255.255",

"optimalDisplay": [

"10.0.0.0/8"

],

"singleIP": false,

"cidr": true,

"any": false

}

],

"externalNetworks": [

{

"id": 1,

"minIp": 134744072,

"maxIp": 134744072,

"display": "8.8.8.8",

"displayRange": "8.8.8.8",

"optimalDisplay": [

"8.8.8.8"

],

"singleIP": true,

"cidr": true,

"any": false

}

],

"status": "Done",

"progress": 1

}

Back to top

Stop a Topology Advisor job

The abort request stops an execution that is in progress.

Resource Name: ms-mapDiagnostics/v1/api/mapCompleteness/abort*/

Request Method: POST

Authentication: Cookie with session ID.

Response:

Element

Type

Description

status

String

A message which indicates success or a reason for failure.

Back to top

Retrieve Topology Advisor default values

The defaultValues request provides the default values of the Topology Advisor parameters for the specific AFA environment.

By default, the maximum number of paths that will be simulated (queries that will be run) is 400. The default external networks used in the calculation is 8.8.8.8. If a custom risk profile spreadsheet is being used in AFA, the networks in the spreadsheet are used as the default internal networks. If no such spreadsheet is being used, RFC 1918 is used to provide the default internal networks.

Resource Name: ms-mapDiagnostics/v1/api/mapCompleteness/defaultValues*/

Request Method: GET

Authentication: Cookie with session ID.

Response:

Element

Type

Description

score

Integer

The score of suggested routers.

executionTime

Integer

The timestamp for the execution.

executionTimeofLastSucceccfulJob

Integer

The timestamp for the last execution.

queries

Integer

The default number of queries.

snmpKey

String

The network's SNMP key.

internalNetworks

A list of ip objects

The default internal subnets for the environment.

externalNetworks

A list of ip objects

The default external subnets for the environment.

status

String

The status of the last execution.

progress

Boolean

The last execution's progress.

Response example

{

"score":18,

"executionTime":1528141226870,

"executionTimeOfLastSuccessfulJob":1528141226826,

"queries":400,

"snmpKey":null,

"internalNetworks":[

{

"id":4,

"minIp":3232235520,

"maxIp":3232301055,

"display":"192.168.0.0/16",

"displayRange":"192.168.0.0-192.168.255.255",

"optimalDisplay":[

"192.168.0.0/16"

],

"singleIP":false,

"cidr":true,

"any":false

},

{

"id":2,

"minIp":167772160,

"maxIp":184549375,

"display":"10.0.0.0/8",

"displayRange":"10.0.0.0-10.255.255.255",

"optimalDisplay":[

"10.0.0.0/8"

],

"singleIP":false,

"cidr":true,

"any":false

},

{

"id":23,

"minIp":2896166912,

"maxIp":2897215487,

"display":"172.160.0.0/12",

"displayRange":"172.160.0.0-172.175.255.255",

"optimalDisplay":[

"172.160.0.0/12"

],

"singleIP":false,

"cidr":true,

"any":false

}

],

"externalNetworks":[

{

"id":1,

"minIp":134744072,

"maxIp":134744072,

"display":"8.8.8.8",

"displayRange":"8.8.8.8",

"optimalDisplay":[

"8.8.8.8"

],

"singleIP":true,

"cidr":true,

"any":false

}

],

"status":"Done",

"progress":1.0

}

Back to top