Skip to main content
Version: Next

Request Service

Protobuf Definition#

service RequestService {    rpc GetLsNodes(TopologyRequest) returns (LsNodeResponse) {}    rpc GetLsLinks(TopologyRequest) returns (LsLinkResponse) {}    rpc GetLsPrefixes(TopologyRequest) returns (LsPrefixResponse) {}    rpc GetLsSrv6Sids(TopologyRequest) returns (LsSrv6SidResponse) {}    rpc GetLsNodeEdges(TopologyRequest) returns (LsNodeEdgeResponse) {}    rpc GetPeers(TopologyRequest) returns (PeerResponse) {}    rpc GetLsNodeCoordinates(LsNodeCoordinatesRequest) returns (LsNodeCoordinatesResponse) {}    rpc GetTelemetryData(TelemetryRequest) returns (TelemetryResponse) {}    rpc GetMeasurements(MeasurementsRequest) returns (MeasurementsResponse) {}    rpc GetMeasurementDetails(MeasurementDetailsRequest) returns (MeasurementDetailsResponse) {}}

Methods#

GetLsNodes()#

rpc GetLsNodes(TopologyRequest) returns (LsNodeResponse) {}

See also: TopologyRequest, LsNodeResponse

Description#

Takes a TopologyRequest with the specified keys and properties and returns an LsNodeResponse containing all requested LsNodes with the requested properties.

  • Omitting keys returns all available LsNodes.
  • Omitting properties returns LsNodes with all available properties.

Examples#

Example 1
Request specific properties of specific LsNodes.
TopologyRequest {    "keys": [        "nodeKey1",        "nodeKey2"    ],    "properties": [        "Key",        "Name",        "Asn"    ]}
🠗
LsNodeResponse {    "LsNodes": [        {            "Key": "nodeKey1",            "Name": "XR-1",            "Asn": 65001        },        {            "Key": "nodeKey2",            "Name": "XR-2",            "Asn": 65001        }    ]}
Example 2
Request specific properties of all available LsNodes.
TopologyRequest {    "properties": [        "Key",        "Name",        "Asn"    ]}
🠗
LsNodeResponse {    "LsNodes": [        ...        {            "Key": "nodeKey7",            "Name": "XR-7",            "Asn": 65002        },        ...    ]}
Example 3
Request all properties of specific LsNodes.
TopologyRequest {    "keys": [        "nodeKey1",        "nodeKey2"    ],}
🠗
LsNodeResponse {    "LsNodes": [        {            "Key": "nodeKey1",            "Id": 773,            "RouterHash": "7eb583cb3c17c496cfa9370d9bc2a3eb",            ...        },        {            "Key": "nodeKey2",            "Id": 809,            "RouterHash": "8a75f65ed2153517f0e4e25f7e5112e8",            ...        }    ]}
Example 4
Request all properties of all available LsNodes.
TopologyRequest {}
🠗
LsNodeResponse {    "LsNodes": [        ...        {            "Key": "nodeKey7",            "Id": 773,            "RouterHash": "7eb583cb3c17c496cfa9370d9bc2a3eb",            ...        },        ...    ]}

GetLsLinks()#

rpc GetLsLinks(TopologyRequest) returns (LsLinkResponse) {}

See also: TopologyRequest, LsLinkResponse

Description#

See method GetLsNodes(). It follows the same principle regarding keys and properties.

GetLsPrefixes()#

rpc GetLsPrefixes(TopologyRequest) returns (LsPrefixResponse) {}

See also: TopologyRequest, LsPrefixResponse

Description#

See method GetLsNodes(). It follows the same principle regarding keys and properties.

GetLsSrv6Sids()#

rpc GetLsSrv6Sids(TopologyRequest) returns (LsSrv6SidResponse) {}

See also: TopologyRequest, LsSrv6SidResponse

Description#

See method GetLsNodes(). It follows the same principle regarding keys and properties.

GetLsNodeEdges()#

rpc GetLsNodeEdges(TopologyRequest) returns (LsNodeEdgeResponse) {}

See also: TopologyRequest, LsNodeEdgeResponse

Description#

See method GetLsNodes(). It follows the same principle regarding keys and properties.

GetPeers()#

rpc GetPeers(TopologyRequest) returns (PeerResponse) {}

See also: TopologyRequest, PeerResponse

Description#

See method GetLsNodes(). It follows the same principle regarding keys and properties.

GetLsNodeCoordinates()#

rpc GetLsNodeCoordinates(TopologyRequest) returns (NodeCoordinatesResponse) {}

See also: TopologyRequest, NodeCoordinatesResponse

Description#

This RPC method retrieves the geographical coordinates of Link-State (LS) nodes based on the provided TopologyRequest. It allows clients to query for nodes' geographical information, which can be used for mapping or analysis purposes. The response, NodeCoordinatesResponse, contains the latitude and longitude of each requested node.

The method follows the same principle regarding keys and properties as described in GetPeers(), allowing for a flexible and targeted query mechanism.

GetTelemetryData()#

rpc GetTelemetryData(TelemetryRequest) returns (TelemetryResponse) {}

See also: TelemetryRequest, TelemetryResponse

Description#

Takes a TelemetryRequest and returns a TelemetryResponse containing an array of JSON strings.

The Jalapeño API Gateway works with all Yang Models that are supported by Jalapeño. To use a Yang Model, simply configure it on the routers and supply the Sensor Path in the request.

message TelemetryRequest {    required string sensor_path = 1;    repeated string properties = 2;    optional bool Unflatten = 3;    repeated StringFilter string_filters = 4;    optional RangeFilter range_filter = 5;}
  • SensorPath: Sensor Path of which data is requested (i.e. "Cisco-IOS-XR-pfi-im-cmd-oper:interfaces/interface-xr/interface")
  • Properties: String array of properties to select from the Yang Model. The property names are the exact sensor path that point to the property but without the more generic Sensor Path specified before, (i.e. "data_rates/output_data_rate")
  • StringFilter: Allows to filter by string values.
  • RangeFilter: Allows to request a range of data.

JAGW Explorer

The SR-App JAGW Explorer is a useful tool that can help you determine the exact name of the SensorPath and the Properties called JAGW Explorer. The code is available on GitHub. The application can be deployed using the docker image or in a Kubernetes cluster using the Helm chart.

Examples#

Example 1
TelemetryRequest {    "SensorPath": "Cisco-IOS-XR-pfi-im-cmd-oper:interfaces/interface-xr/interface",    "Properties": [        "data_rates/output_data_rate",        "interface_statistics/full_interface_stats/bytes_sent"        ],    "Unflatten": false,    "StringFilter": [        {            "Property": "source",            "Value": "XR-8",            "Operator": StringOperator.EQUAL        }    ],    "RangeFilter": {        "EarliestTimestamp": 1630050953974000000    }}
🠗
TelemetryResponse {    "TelemetryData": [        "{            \"time\": \"2021-11-10T08:53:08.382Z\",            \"data_rates/output_data_rate\": 53,            \"interface_statistics/full_interface_stats/bytes_sent\": 447        }"    ]}
🠗

The JSON string can then be parsed to this:

{    "time": "2021-11-10T08:53:08.382Z",    "data_rates/output_data_rate": 53,    "interface_statistics/full_interface_stats/bytes_sent": 447}
🠗

If Unflatten is set to true in the original request, the resulting JSON would look like this:

{    "time": "2021-11-10T08:53:08.382Z",    "data_rates": {        "output_data_rate": 53,    },    "interface_statistics": {        "full_interface_stats": {            "bytes_sent": 447        }    }}