Well the returned result looks like this in JSON format:
[
{
"networkId": "N_123456789012345678",
"serial": "Q2**-****-****",
"uplink": "wan1",
"ip": "10.9.6.1",
"timeSeries": [
{
"ts": "2019-02-06T17:54:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:55:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:56:53Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:57:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:58:52Z",
"lossPercent": 0,
"latencyMs": 0.5
}
]
},
{
"networkId": "N_987656789012345678",
"serial": "Q3**-****-****",
"uplink": "wan1",
"ip": "10.9.6.1",
"timeSeries": [
{
"ts": "2019-02-06T17:54:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:55:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:56:53Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:57:52Z",
"lossPercent": 0,
"latencyMs": 0.5
},
{
"ts": "2019-02-06T17:58:52Z",
"lossPercent": 0,
"latencyMs": 0.5
}
]
}
]
Ideally in a script you loop over those results, compare the "networkId" value of each entry to a list/array of networkId's you're interested in and either keep or discard that entry.
It's not really needed to have the intermediary csv.