Statistic
9 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getOswRankingCards | POST | Get switch ranking cards |
| getOltStatChart | POST | Get olt statistics chart |
| getOswStackDetailStat | POST | Get switch stack statistics |
| getStackStatChart | POST | Get stack statistics chart |
| getSwitchStat | GET | Get switch statistics |
| getSwitchStatChart | POST | Get switch statistics chart |
| getDevice5MinStatistic | POST | Get device statistic data 5 min |
| getDeviceDailyStatistic | POST | Get device statistic data daily |
| getDeviceHourlyStatistic | POST | Get device statistic data hourly |
getOswRankingCards
POST /openapi/v1/{omadacId}/sites/{siteId}/health/switches/rankingCards
Get switch ranking cards
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema TimeQueryOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | End time, number of seconds from UTC0 1970/01/01 |
// omada_call_operation
{
"operationId": "getOswRankingCards",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Get switch ranking cards
The interface requires one of the permissions:
Incidents Page View Only
getOltStatChart
POST /openapi/v1/{omadacId}/sites/{siteId}/stat/olts/{deviceMac}/chart
Get olt statistics chart
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
Request body — application/json (required) — schema OltStatQueryOpenApiDTO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | End time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0.Item of attrs should be a value as follows: mem, cpu, up, down, onuCount, tx, rx, txRate, rxRate, txPackets, rxPackets, txBroadcastPackets, rxBroadcastPackets, txMulticastPackets, rxMulticastPackets |
oltPorts | array<string> | no | Statistics of the selected ports of Olt would be queried. |
// omada_call_operation
{
"operationId": "getOltStatChart",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>"
},
"body": "{...}"
}Details, permissions and error codes
Display statistics based on the time granularity calculated by start and end times:
Within 26 hours, 5 minutes of data is displayed
26 hours to 7 days 2 hours, showing hourly statistics
7 days 2 hours to 120 days 2 hours, showing daily statistics
120 days 2 hours or more, showing weekly statistics
The interface requires one of the permissions:
Site Statics Manager View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
getOswStackDetailStat
POST /openapi/v1/{omadacId}/sites/{siteId}/stat/stack/{stackId}
Get switch stack statistics
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
stackId | path | string | yes | Stack ID |
Request body — application/json (required) — schema OswStackStatQueryVO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | End time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0.Item of attrs should be a value as follows: mem, cpu, tx, rx, txRate, rxRate, txPkts, rxPkts, txBroadPkts, rxBroadPkts, txMultiPkts, rxMultiPkts, dropPkts, txErrPkts, rxErrPkts |
interval | integer | yes | Interval should be a value as follows: 0:5min, 1:hourly, 2:daily |
// omada_call_operation
{
"operationId": "getOswStackDetailStat",
"params": {
"siteId": "<siteId>",
"stackId": "<stackId>"
},
"body": "{...}"
}Details, permissions and error codes
Get switch stack statistics
The interface requires one of the permissions:
Site Statics Manager View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-40200 - This switch stack is not existed.
getStackStatChart
POST /openapi/v1/{omadacId}/sites/{siteId}/stat/stack/{stackId}/chart
Get stack statistics chart
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
stackId | path | string | yes | Stack ID |
Request body — application/json (required) — schema OswStackStatQueryOpenApiDTO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | End time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0. Item of attrs should be a value as follows: mem, cpu, tx, rx, txRate, rxRate, txPkts, rxPkts, txBroadPkts, rxBroadPkts, txMultiPkts, rxMultiPkts, dropPkts, txErrPkts, rxErrPkts |
standardPorts | array<string> | no | Statistics of the selected ports of Stack would be queried. |
// omada_call_operation
{
"operationId": "getStackStatChart",
"params": {
"siteId": "<siteId>",
"stackId": "<stackId>"
},
"body": "{...}"
}Details, permissions and error codes
Display statistics based on the time granularity calculated by start and end times:
Within 26 hours, 5 minutes of data is displayed
26 hours to 7 days 2 hours, showing hourly statistics
7 days 2 hours to 120 days 2 hours, showing daily statistics
120 days 2 hours or more, showing weekly statistics
The interface requires one of the permissions:
Site Statics Manager View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
getSwitchStat
GET /openapi/v1/{omadacId}/sites/{siteId}/stat/switches/{deviceMac}
Get switch statistics
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
// omada_call_operation
{
"operationId": "getSwitchStat",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>"
}
}Details, permissions and error codes
Get switch statistics
The interface requires one of the permissions:
Site Statics Manager View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-39700 - Switch does not exist
getSwitchStatChart
POST /openapi/v1/{omadacId}/sites/{siteId}/stat/switches/{deviceMac}/chart
Get switch statistics chart
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
Request body — application/json (required) — schema OswStatQueryOpenApiDTO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | End time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0. Item of attrs should be a value as follows: mem, cpu, tx, rx, txRate, rxRate, txPkts, rxPkts, txBroadPkts, rxBroadPkts, txMultiPkts, rxMultiPkts, dropPkts, txErrPkts, rxErrPkts |
ports | array<integer> | no | Statistics of the selected ports of Switch would be queried. |
// omada_call_operation
{
"operationId": "getSwitchStatChart",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>"
},
"body": "{...}"
}Details, permissions and error codes
Display statistics based on the time granularity calculated by start and end times:
Within 26 hours, 5 minutes of data is displayed
26 hours to 7 days 2 hours, showing hourly statistics
7 days 2 hours to 120 days 2 hours, showing daily statistics
120 days 2 hours or more, showing weekly statistics
The interface requires one of the permissions:
Site Statics Manager View Only
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
getDevice5MinStatistic
POST /openapi/v2/{omadacId}/sites/{siteId}/stat/{deviceMac}/5min
Get device statistic data 5 min
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
type | query | string | yes | Device Type. Supported type: ap, gateway, switch, olt. |
Request body — application/json (required) — schema StatQueryVO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | end time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0 or be omitted. The supported attrs and response fields depend on the device type and statistic granularity. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide. |
ports | array<integer> | no | The ports in the lag. Each item is Integer, for example: [1, 2]. |
standardPorts | array<string> | no | Statistics of the selected ports would be queried , the param is valid when stacking |
oltPorts | array<string> | no | Statistics of the selected ports of olt would be queried. |
// omada_call_operation
{
"operationId": "getDevice5MinStatistic",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>",
"type": "<type>"
},
"body": "{...}"
}Details, permissions and error codes
Get device statistic data 5 min. The supported attrs and response fields depend on the type parameter. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide.
The interface requires one of the permissions:
Site Device Manager View Only
Site Statics Manager View Only
getDeviceDailyStatistic
POST /openapi/v2/{omadacId}/sites/{siteId}/stat/{deviceMac}/daily
Get device statistic data daily
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
type | query | string | yes | Device Type. Supported type: ap, gateway, switch, olt. |
Request body — application/json (required) — schema StatQueryVO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | end time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0 or be omitted. The supported attrs and response fields depend on the device type and statistic granularity. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide. |
ports | array<integer> | no | The ports in the lag. Each item is Integer, for example: [1, 2]. |
standardPorts | array<string> | no | Statistics of the selected ports would be queried , the param is valid when stacking |
oltPorts | array<string> | no | Statistics of the selected ports of olt would be queried. |
// omada_call_operation
{
"operationId": "getDeviceDailyStatistic",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>",
"type": "<type>"
},
"body": "{...}"
}Details, permissions and error codes
Get device statistic data daily. The supported attrs and response fields depend on the type parameter. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide.
The interface requires one of the permissions:
Site Device Manager View Only
Site Statics Manager View Only
getDeviceHourlyStatistic
POST /openapi/v2/{omadacId}/sites/{siteId}/stat/{deviceMac}/hourly
Get device statistic data hourly
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
deviceMac | path | string | yes | Device MAC address, like AA-BB-CC-DD-EE-FF |
type | query | string | yes | Device Type. Supported type: ap, gateway, switch, olt. |
Request body — application/json (required) — schema StatQueryVO
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start time, number of seconds from UTC0 1970/01/01 |
end | integer | yes | end time, number of seconds from UTC0 1970/01/01 |
attrs | array<string> | yes | Attributes to be queried. Attributes not included in attrs will return a value of 0 or be omitted. The supported attrs and response fields depend on the device type and statistic granularity. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide. |
ports | array<integer> | no | The ports in the lag. Each item is Integer, for example: [1, 2]. |
standardPorts | array<string> | no | Statistics of the selected ports would be queried , the param is valid when stacking |
oltPorts | array<string> | no | Statistics of the selected ports of olt would be queried. |
// omada_call_operation
{
"operationId": "getDeviceHourlyStatistic",
"params": {
"siteId": "<siteId>",
"deviceMac": "<deviceMac>",
"type": "<type>"
},
"body": "{...}"
}Details, permissions and error codes
Get device statistic data hourly. The supported attrs and response fields depend on the type parameter. For details, refer to section 5.9.1 Device Statistics of the Open API Access Guide.
The interface requires one of the permissions:
Site Device Manager View Only
Site Statics Manager View Only