We would like to query connectivity metrics using the accountMetrics API. This works as expected for metrics such as bytesUpstream, bytesDownstream. However, it fails for some other metrics such as tunnelAge and lastMilePacketLoss.
Request URL: https://api.catonetworks.com/api/v1/graphql2
Request body:
{
"query": "{ accountMetrics(accountID:XXXX timeFrame: \"utc.xxxx/{15:50:00--16:00:00}\" groupInterfaces:false groupDevices:false) { sites { interfaces { metrics { tunnelAge } timeseries(buckets: 10 labels: [tunnelAge]) { data label units } } } } }"
}Exception: 422 Unprocessable Entity
{
"errors": [
{
"message": "Cannot query field \"tunnelAge\" on type \"Metrics\".",
"locations": [
{
"line": 1,
"column": 157
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
],
"data": null
}According to the documentation, this should work: Cato API - AccountMetrics > Timeseries – Cato Learning Center
Why is it that this request does not work for 'tunnelAge' but does work for 'bytesUpstream'?