When running the API /api/ni/path/firewall-rules for a specific flow, the matching firewall rules will not include the firewall rules with Pre-defined service. Only Firewall rules with Raw Ports will show in the API response.
Aria Operations For Networking
The behavior is by design and due to appending raw protocol definitions directly to the Firewall Rule. As a result, the rule derives its protocol and port information solely from these raw definitions.
Consequently, if a request specifies a port or protocol that doesn't exactly match the raw definitions - even if the nested service contains matching values - the rule will not be returned in the query response.
{
"query": "rules where source ip = '<source_ip>' and dest ip = '<destination_ip>' and service =<service_name>",
"size": <size>
}