This function is used to calculate a path between two endpoints. The result will be returned in the form of a path ID, and you can use the path ID in the Get Path Calculation Result as the request parameter to get each hop information of the path.

Resource Information

Method

URL

Required authentication

POST

/V1/CMDB/Path/Calculation

Yes

Parameters

Name

Description

Token*required
(header)

The token can be obtained by sending a POST request to the log in session endpoint and provide valid credentials.

body*required
(body)

The request body contains the following parameters:

sourceIP*(string): IP address of the source device.

sourcePort (integer): Source protocol port, for example, 23 for telnet. This parameter can be null.

sourceGwIP* (string): Gateway for path calculation.

osourceGwDevice*: Hostname of the gateway device.

osourceGwIntf*: Name of the gateway interface.

destIP*(string): IP address of the destination device.

destPort (integer): Destination protocol port, for example, 23 for telnet. This parameter can be null.

pathAnalysisSet* (integer): Path type used to calculate.

o1: L3 Path

o2: L2 Path

o3: L3 Active Path

protocol* (integer): Application protocol, for example, 4 for IPv4, and 6 for TCP.

isLive (integer): Data source used to calculate the path.

o0: use data from the current baseline.

o1: use data via live access.

Example:

{
  "sourceIP""10.10.3.253",
  "sourcePort"0,
  "sourceGwIP""10.10.3.253",
  "sourceGwDev""GW2Lab",
  "sourceGwIntf""GigabitEthernet0/0.10",
  "destIP""172.24.32.225",
  "destPort"0,
  "pathAnalysisSet"1,
  "protocol"4,
  "isLive"1
}

Response

Parameter

Type

Description

Example

taskId

string

The ID of the task.

{
  "taskId""string",
  "statusCode"790200,
  "statusDescription""success"
}

statusCode

integer

Code issued by NetBrain server indicating the execution result.

statusDescription

string

The explanation of the status code.