API Application Mapping
From Observer GigaFlow Support | VIAVI Solutions Inc.
API endpoint is: http://viavi.anuview.net/rest/?jsonRequest={“type”:”configurationout”}
This will return a few elements but the interesting ones are “Named Ports” and “Defined Applications”
Both are just json arrays, Named Ports maps the basic port/protocol to a human name, these are always the positive IDs. e.g.
"Named Ports": [{ "id": 393223, "value": "ECHO" }, { "id": 393730, "value": "SHELL" }, { "id": 393731, "value": "PRINTER" }, { "id": 395265, "value": "NFSD" }, { "id": 397327, "value": "XGRID" }, { "id": 399116, "value": "VNC-SERVER" }]
If there is no name or you just want the port/protocol you can decode the ID directly using
public static int[] getProtocolPortInts(int integer) { int protocol = integer / 65536; int protocolMultiplied = integer - (integer % 65536); int port = integer - protocolMultiplied; return new int[]{protocol, port}; }
Defined Applications are the profiler-based application mappings, these always have a negative ID, the “profileid” in each object maps to the flow object used to mark the traffic.
"Defined Applications": [{ "description": "Just for test", "id": -212, "name": "DNS TEST", "profileid": -210, "rank": -1 }, { "description": "Teamviewer Remote Access", "id": -199, "name": "Teamviewer", "profileid": -197, "rank": -1 }, { "description": "Yahoo Test icon ", "id": -150, "name": "Yahoo App ", "profileid": -148, "rank": -1 }]