Monitoring¶
The new_monitoring module provides wrappers around the Central network monitoring REST API. Modules are organized by resource type: APs, Clients, Devices, Gateways, Sites, Switches, and WLANs.
APs¶
Access Points¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_aps |
GET network-monitoring/v1/aps |
Retrieves all AP records by paging through the AP listing endpoint. |
get_aps |
GET network-monitoring/v1/aps |
Retrieves a single page of AP records with optional filter and sort support. |
get_ap_details |
GET network-monitoring/v1/aps/{serial_number} |
Retrieves details for a specific AP. |
get_ap_trends |
GET network-monitoring/v1/aps/{serial_number}/throughput-trendsGET network-monitoring/v1/aps/{serial_number}/cpu-utilization-trendsGET network-monitoring/v1/aps/{serial_number}/memory-utilization-trendsGET network-monitoring/v1/aps/{serial_number}/power-consumption-trends |
Retrieves AP trend data for throughput, CPU, memory, or power consumption. |
get_ap_wlans |
GET network-monitoring/v1/aps/{serial_number}/wlans |
Retrieves WLANs associated with a specific AP. |
get_ap_ports |
GET network-monitoring/v1/aps/{serial_number}/ports |
Retrieves port information for a specific AP. |
get_ap_port_trends |
GET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/throughput-trendsGET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/frames-trendsGET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/crc-trendsGET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/collisions-trends |
Retrieves trend data for a specific AP port. |
Radios¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_radios |
GET network-monitoring/v1/radios |
Retrieves all fleet radio records by handling pagination automatically. |
get_radios |
GET network-monitoring/v1/radios |
Retrieves a single page of fleet radios. |
get_ap_radios |
GET network-monitoring/v1/aps/{serial_number}/radios |
Retrieves radios associated with a specific AP. |
get_ap_radio_trends |
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/throughput-trendsGET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/channel-utilization-trendsGET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/channel-quality-trendsGET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/noise-floor-trendsGET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/frames-trends |
Retrieves trend data for a specific radio on an AP. |
BSSIDs¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_bssids |
GET network-monitoring/v1/bssids |
Retrieves all fleet BSSID records by handling pagination automatically. |
get_bssids |
GET network-monitoring/v1/bssids |
Retrieves a single page of fleet BSSIDs. |
Swarms¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_swarms |
GET network-monitoring/v1/swarms |
Retrieves all swarm records by handling pagination automatically. |
get_swarms |
GET network-monitoring/v1/swarms |
Retrieves a single page of swarms. |
get_swarm_details |
GET network-monitoring/v1/swarms/{cluster_id} |
Retrieves details for a specific swarm cluster. |
AP Tunnels¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_ap_tunnels |
GET network-monitoring/v1/aps/{serial_number}/tunnels |
Retrieves all tunnel records for an AP by handling pagination automatically. |
get_ap_tunnels |
GET network-monitoring/v1/aps/{serial_number}/tunnels |
Retrieves a single page of tunnel records for an AP. |
get_ap_tunnel_details |
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id} |
Retrieves details for a specific tunnel on an AP. |
get_ap_tunnel_trends |
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/throughput-trendsGET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/packet-loss-trendsGET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/mos-trendsGET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/jitter-trendsGET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/latency-trends |
Retrieves trend data for a specific AP tunnel. |
Module Reference¶
aps
¶
MonitoringAPs
¶
get_all_aps(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all access points (APs), handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/aps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of AP items. |
Source code in pycentral/new_monitoring/aps.py
get_aps(central_conn, filter_str=None, sort=None, limit=AP_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of APs.
This method makes an API call to the following endpoint - GET network-monitoring/v1/aps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
limit
|
int
|
Number of entries to return (default is 1000). |
AP_LIMIT
|
next_page
|
int
|
Pagination cursor/index for next page (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response for the aps endpoint (contains 'items', 'total', etc.). |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit or next_page values are invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_details(central_conn, serial_number)
staticmethod
¶
Get details for a specific AP.
This method makes an API call to the following endpoint - GET network-monitoring/v1/aps/{serial_number}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with AP details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_trends(central_conn, serial_number, metric, start_time=None, end_time=None, duration=None, site_id=None, interface_type='WIRELESS', return_raw_response=False)
staticmethod
¶
Retrieve trend data for an AP metric.
This method makes an API call to one of the following endpoints based on metric -
GET network-monitoring/v1/aps/{serial_number}/throughput-trends
GET network-monitoring/v1/aps/{serial_number}/cpu-utilization-trends
GET network-monitoring/v1/aps/{serial_number}/memory-utilization-trends
GET network-monitoring/v1/aps/{serial_number}/power-consumption-trends
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
metric
|
str
|
Trend metric to retrieve. Supported values are |
required |
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string or seconds for relative queries. |
None
|
site_id
|
str
|
Site identifier to scope the trend request. |
None
|
interface_type
|
str
|
Interface type for throughput requests. Supported values are |
'WIRELESS'
|
return_raw_response
|
bool
|
If True, return the raw API payload. Otherwise return normalized trend samples. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns the raw API response; otherwise returns normalized trend samples. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number, metric, or interface_type is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_all_radios(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all fleet radios, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/radios
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the radio list. |
None
|
sort
|
str
|
Optional sort expression for the radio list. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of radio items. |
Source code in pycentral/new_monitoring/aps.py
get_radios(central_conn, filter_str=None, sort=None, limit=RADIO_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of fleet radios.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/radios
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the radio list. |
None
|
sort
|
str
|
Optional sort expression for the radio list. |
None
|
limit
|
int
|
Number of entries to return. |
RADIO_LIMIT
|
next_page
|
int
|
Pagination cursor/index for the next page. |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response for the radios endpoint. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit, next_page, filter_str, or sort is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_all_bssids(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all fleet BSSIDs, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/bssids
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the BSSID list. |
None
|
sort
|
str
|
Optional sort expression for the BSSID list. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of BSSID items. |
Source code in pycentral/new_monitoring/aps.py
get_bssids(central_conn, filter_str=None, sort=None, limit=BSSID_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of fleet BSSIDs.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/bssids
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the BSSID list. |
None
|
sort
|
str
|
Optional sort expression for the BSSID list. |
None
|
limit
|
int
|
Number of entries to return. |
BSSID_LIMIT
|
next_page
|
int
|
Pagination cursor/index for the next page. |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response for the bssids endpoint. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit, next_page, filter_str, or sort is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_all_swarms(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all swarms, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/swarms
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the swarm list. |
None
|
sort
|
str
|
Optional sort expression for the swarm list. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of swarm items. |
Source code in pycentral/new_monitoring/aps.py
get_swarms(central_conn, filter_str=None, sort=None, limit=SWARM_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of swarms.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/swarms
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression for the swarm list. |
None
|
sort
|
str
|
Optional sort expression for the swarm list. |
None
|
limit
|
int
|
Number of entries to return. |
SWARM_LIMIT
|
next_page
|
int
|
Pagination cursor/index for the next page. |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response for the swarms endpoint. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit, next_page, filter_str, or sort is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_swarm_details(central_conn, cluster_id)
staticmethod
¶
Get details for a specific swarm.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/swarms/{cluster_id}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
cluster_id
|
str
|
Cluster identifier for the swarm. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with swarm details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If cluster_id is missing. |
Source code in pycentral/new_monitoring/aps.py
get_ap_radios(central_conn, serial_number)
staticmethod
¶
Retrieve radios associated with an AP.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/aps/{serial_number}/radios
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with radio details for the AP. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_radio_trends(central_conn, serial_number, radio_number, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a radio under an AP.
This method makes an API call to one of the following endpoints based on metric -
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/throughput-trends
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/channel-utilization-trends
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/channel-quality-trends
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/noise-floor-trends
GET network-monitoring/v1/aps/{serial_number}/radios/{radio_number}/frames-trends
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
radio_number
|
str | int
|
Radio number under the AP. |
required |
metric
|
str
|
Radio trend metric to retrieve. |
required |
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string or seconds for relative queries. |
None
|
site_id
|
str
|
Site identifier to scope the trend request. |
None
|
return_raw_response
|
bool
|
If True, return the raw API payload. Otherwise return normalized trend samples. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns the raw API response; otherwise returns normalized trend samples. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number, radio_number, or metric is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_ports(central_conn, serial_number)
staticmethod
¶
Retrieve ports associated with an AP.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/aps/{serial_number}/ports
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with port details for the AP. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_port_trends(central_conn, serial_number, port_index, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a port under an AP.
This method makes an API call to one of the following endpoints based on metric -
GET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/throughput-trends
GET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/frames-trends
GET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/crc-trends
GET network-monitoring/v1/aps/{serial_number}/ports/{port_index}/collisions-trends
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
port_index
|
str | int
|
Port index under the AP. |
required |
metric
|
str
|
Port trend metric to retrieve. |
required |
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string or seconds for relative queries. |
None
|
site_id
|
str
|
Site identifier to scope the trend request. |
None
|
return_raw_response
|
bool
|
If True, return the raw API payload. Otherwise return normalized trend samples. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns the raw API response; otherwise returns normalized trend samples. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number, port_index, or metric is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_all_ap_tunnels(central_conn, serial_number, site_id=None, filter_str=None, sort=None)
staticmethod
¶
Retrieve all AP tunnels, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/aps/{serial_number}/tunnels
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
site_id
|
str
|
Site identifier for the tunnel list. |
None
|
filter_str
|
str
|
Optional filter expression for the tunnel list. |
None
|
sort
|
str
|
Optional sort expression for the tunnel list. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of tunnel items for the AP. |
Source code in pycentral/new_monitoring/aps.py
get_ap_tunnels(central_conn, serial_number, site_id=None, filter_str=None, sort=None, limit=TUNNEL_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of AP tunnels.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/aps/{serial_number}/tunnels
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
site_id
|
str
|
Site identifier for the tunnel list. |
None
|
filter_str
|
str
|
Optional filter expression for the tunnel list. |
None
|
sort
|
str
|
Optional sort expression for the tunnel list. |
None
|
limit
|
int
|
Number of entries to return. |
TUNNEL_LIMIT
|
next_page
|
int
|
Pagination cursor/index for the next page. |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response for the AP tunnels endpoint. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number, limit, next_page, site_id, filter_str, or sort is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_tunnel_details(central_conn, serial_number, tunnel_id)
staticmethod
¶
Retrieve details for a tunnel under an AP.
This method makes an API call to the following endpoint -
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
tunnel_id
|
str
|
Tunnel identifier under the AP. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with tunnel details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number or tunnel_id is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_tunnel_trends(central_conn, serial_number, tunnel_id, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a tunnel under an AP.
This method makes an API call to one of the following endpoints based on metric -
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/throughput-trends
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/packet-loss-trends
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/mos-trends
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/jitter-trends
GET network-monitoring/v1/aps/{serial_number}/tunnels/{tunnel_id}/latency-trends
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
tunnel_id
|
str
|
Tunnel identifier under the AP. |
required |
metric
|
str
|
Tunnel trend metric to retrieve. |
required |
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string or seconds for relative queries. |
None
|
site_id
|
str
|
Site identifier to scope the trend request. |
None
|
return_raw_response
|
bool
|
If True, return the raw API payload. Otherwise return normalized trend samples. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns the raw API response; otherwise returns normalized trend samples. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number, tunnel_id, or metric is invalid. |
Source code in pycentral/new_monitoring/aps.py
get_ap_wlans(central_conn, serial_number)
staticmethod
¶
Retrieve WLANs associated with an AP.
This method makes an API call to the following endpoint - GET network-monitoring/v1/aps/{serial_number}/wlans
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the AP. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response of associated WLANs. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/aps.py
Clients¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_clients |
GET network-monitoring/v1/clients |
Retrieves all clients by handling pagination automatically. |
get_clients |
GET network-monitoring/v1/clients |
Retrieves a single page of clients with optional filter and sort support. |
get_wireless_clients |
GET network-monitoring/v1/clients |
Retrieves all wireless clients, optionally scoped to a site or device. |
get_wired_clients |
GET network-monitoring/v1/clients |
Retrieves all wired clients, optionally scoped to a site or device. |
get_connected_clients |
GET network-monitoring/v1/clients |
Retrieves all connected clients, optionally scoped to a site or device. |
get_failed_clients |
GET network-monitoring/v1/clients |
Retrieves all failed clients, optionally scoped to a site or device. |
get_clients_associated_device |
GET network-monitoring/v1/clients |
Retrieves all clients associated with a specific device. |
get_client_details |
GET network-monitoring/v1/clients/{client_mac} |
Retrieves details for a specific client by MAC address. |
get_client_trends |
GET network-monitoring/v1/clients-trend |
Retrieves client trend data, optionally scoped to a site or device. |
get_top_n_clients |
GET network-monitoring/v1/clients-topn-usage |
Retrieves the top-N clients by usage, optionally scoped to a site or device. |
Module Reference¶
clients
¶
Clients
¶
get_all_clients(central_conn, site_id=None, site_name=None, serial_number=None, filter_str=None, sort=None, duration=None, start_time=None, end_time=None)
staticmethod
¶
Return all clients based on the provided parameters. Additionally, handle pagination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to filter clients. |
None
|
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
Returns:
| Type | Description |
|---|---|
list
|
All client details for the specified parameters. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_wireless_clients(central_conn, site_id=None, site_name=None, serial_number=None, sort=None, duration=None, start_time=None, end_time=None)
staticmethod
¶
Fetch all wireless clients. Optionally fetch by site/device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
sort
|
str
|
Optional sort expression. |
None
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
Returns:
| Type | Description |
|---|---|
list
|
List of wireless clients. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_wired_clients(central_conn, site_id=None, site_name=None, serial_number=None, sort=None, duration=None, start_time=None, end_time=None)
staticmethod
¶
Fetch all wired clients. Optionally fetch by site/device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
sort
|
str
|
Optional sort expression. |
None
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
Returns:
| Type | Description |
|---|---|
list
|
List of wired clients. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_clients_associated_device(central_conn, serial_number)
staticmethod
¶
Fetch all clients associated with a specific device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Device serial number to filter clients. |
required |
Returns:
| Type | Description |
|---|---|
list
|
Clients associated with the specified device. |
Source code in pycentral/new_monitoring/clients.py
get_connected_clients(central_conn, site_id=None, site_name=None, serial_number=None)
staticmethod
¶
Fetch all connected clients. Optionally fetch by site/device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of connected clients. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_failed_clients(central_conn, site_id=None, site_name=None, serial_number=None)
staticmethod
¶
Fetch all failed clients. Optionally fetch by site/device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of failed clients. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_clients(central_conn, site_id=None, site_name=None, serial_number=None, filter_str=None, sort=None, next_page=1, limit=CLIENT_LIMIT, duration=None, start_time=None, end_time=None)
staticmethod
¶
Fetch clients based on provided parameters. Additionally, handles pagination.
This method makes an API call to the following endpoint - GET network-monitoring/v1/clients
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
next_page
|
int
|
Page token/index for pagination. |
1
|
limit
|
int
|
Maximum number of items to return. |
CLIENT_LIMIT
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response containing keys like 'items', 'total', and 'next'. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_client_trends(central_conn, site_id=None, site_name=None, group_by=None, client_type=None, serial_number=None, start_time=None, end_time=None, duration=None, return_raw_response=False)
staticmethod
¶
Fetch client trend data. Optionally fetch by site/device.
This method makes an API call to the following endpoint - GET network-monitoring/v1/clients-trend
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
group_by
|
str
|
Dimension to group results by (e.g., 'mac', 'ap'). |
None
|
client_type
|
str
|
Trend type (passed as 'type' in the request). |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
return_raw_response
|
bool
|
If True, return the raw API payload. |
False
|
Returns:
| Type | Description |
|---|---|
list[dict] or dict
|
Processed list of timestamped samples, or raw response if requested. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid. |
Source code in pycentral/new_monitoring/clients.py
get_top_n_clients(central_conn, site_id=None, site_name=None, serial_number=None, limit=100, start_time=None, end_time=None, duration=None)
staticmethod
¶
Fetch the top-N clients by usage. Optionally fetch by site/device.
This method makes an API call to the following endpoint - GET network-monitoring/v1/clients-topn-usage
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str | int
|
Identifier of the site to query. |
None
|
site_name
|
str
|
Name of the site to query. |
None
|
serial_number
|
str
|
Device serial number to query. |
None
|
limit
|
int
|
Number of top clients to return (1..100). |
100
|
start_time
|
str
|
Start time (RFC 3339 date-time string). |
None
|
end_time
|
str
|
End time (RFC 3339 date-time string). |
None
|
duration
|
str
|
Relative time window (e.g., '3h', '2d', '1w', '30m'). |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response containing top-N usage data. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id or site_name is provided but invalid, or if limit is not in range 1..100. |
Source code in pycentral/new_monitoring/clients.py
get_client_details(central_conn, client_mac)
staticmethod
¶
Fetch details for a specific client by MAC address.
This method makes an API call to the following endpoint - GET network-monitoring/v1/clients/{client_mac}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
client_mac
|
str
|
MAC address of the client to query. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Client details as returned by the API. |
Source code in pycentral/new_monitoring/clients.py
Devices¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_devices |
GET network-monitoring/v1/devices |
Retrieves all onboarded and monitored devices by handling pagination automatically. |
get_devices |
GET network-monitoring/v1/devices |
Retrieves a single page of onboarded devices with optional filter and sort support. |
get_all_device_inventory |
GET network-monitoring/v1/device-inventory |
Retrieves all devices from the account inventory (including un-onboarded devices) by handling pagination automatically. |
get_device_inventory |
GET network-monitoring/v1/device-inventory |
Retrieves a single page of device inventory records. |
delete_device |
DELETE network-monitoring/v1/devices/{serial_number} |
Deletes a device from Central monitoring (device must be OFFLINE). |
Module Reference¶
devices
¶
MonitoringDevices
¶
get_all_devices(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all devices that are onboarded and currently being monitored in new Central.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
Processed list of all devices. |
Source code in pycentral/new_monitoring/devices.py
get_devices(central_conn, filter_str=None, sort=None, limit=DEVICE_LIMIT, next=1)
staticmethod
¶
Retrieve a single page of devices with optional filtering and sorting. This response retrieves a list of network devices that are onboarded and currently being monitored.
This method makes an API call to the following endpoint - GET network-monitoring/v1/devices
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
limit
|
int
|
Number of entries to return (default is 100). |
DEVICE_LIMIT
|
next
|
int
|
Pagination cursor for next page of resources (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response from the device endpoint (typically contains 'items', 'total', and 'next'). |
Source code in pycentral/new_monitoring/devices.py
get_all_device_inventory(central_conn, filter_str=None, sort=None, site_assigned=None)
staticmethod
¶
Retrieve all devices from the account, including devices that are not yet onboarded to new Central.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
site_assigned
|
str | None
|
Filter by site-assigned status. |
None
|
Returns: (list[dict]): Processed list of all devices from inventory.
Source code in pycentral/new_monitoring/devices.py
get_device_inventory(central_conn, filter_str=None, sort=None, site_assigned=None, limit=DEVICE_LIMIT, next=1)
staticmethod
¶
Retrieve device data from device inventory API response. This API includes devices yet to be onboarded, as well as those already onboarded and currently being monitored.
This method makes an API call to the following endpoint - GET network-monitoring/v1/device-inventory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). |
None
|
sort
|
str
|
Optional sort parameter (supported fields documented in API Reference Guide). |
None
|
site_assigned
|
str | None
|
Filter by site-assigned status. Supported values are "ASSIGNED", "UNASSIGNED" |
None
|
limit
|
int
|
Number of entries to return (default is 100). |
DEVICE_LIMIT
|
next
|
int
|
Pagination cursor for next page of resources (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response containing device inventory per site. |
Source code in pycentral/new_monitoring/devices.py
delete_device(central_conn, serial_number)
staticmethod
¶
Delete a device from Central Monitoring (device must be OFFLINE).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the device to delete. |
required |
Returns:
| Type | Description |
|---|---|
tuple(bool, dict)
|
(True, API response) on success. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If serial_number is missing or not a string. |
Exception
|
If delete API returns a non-200 response. |
Source code in pycentral/new_monitoring/devices.py
Gateways¶
Gateways¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_gateways |
GET network-monitoring/v1/gateways |
Retrieves all gateways by paging through the gateway listing endpoint. |
get_gateways |
GET network-monitoring/v1/gateways |
Retrieves a single page of gateway records with optional filter and sort support. |
get_gateway_details |
GET network-monitoring/v1/gateways/{serial_number} |
Retrieves details for a specific gateway. |
get_gateway_trends |
GET network-monitoring/v1/gateways/{serial_number}/cpu-utilization-trendsGET network-monitoring/v1/gateways/{serial_number}/memory-utilization-trendsGET network-monitoring/v1/gateways/{serial_number}/wan-availability-trendsGET network-monitoring/v1/gateways/{serial_number}/vpn-availability-trendsGET network-monitoring/v1/gateways/{serial_number}/hardware-temperature-trends |
Retrieves gateway trend data for a specified metric (cpu-utilization, memory-utilization, wan-availability, vpn-availability, hardware-temperature). |
Ports¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_gateway_ports |
GET network-monitoring/v1/gateways/{serial_number}/ports |
Retrieves all gateway port records by handling pagination automatically. |
get_gateway_ports |
GET network-monitoring/v1/gateways/{serial_number}/ports |
Retrieves a single page of gateway ports with optional filter and sort support. |
get_gateway_port_details |
GET network-monitoring/v1/gateways/{serial_number}/ports/{port_number} |
Retrieves details for a specific gateway port. |
get_gateway_port_trends |
GET network-monitoring/v1/gateways/{serial_number}/ports/{port_number}/throughput-trendsGET network-monitoring/v1/gateways/{serial_number}/ports/{port_number}/frames-trendsGET network-monitoring/v1/gateways/{serial_number}/ports/{port_number}/frames-errors-trendsGET network-monitoring/v1/gateways/{serial_number}/ports/{port_number}/frames-packets-trends |
Retrieves trend data for a gateway port metric (throughput, frames, frames-errors, frames-packets). |
VLANs¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_gateway_vlans |
GET network-monitoring/v1/gateways/{serial_number}/vlans |
Retrieves all gateway VLAN records by handling pagination automatically. |
get_gateway_vlans |
GET network-monitoring/v1/gateways/{serial_number}/vlans |
Retrieves a single page of gateway VLANs with optional filter and sort support. |
get_gateway_vlan_details |
GET network-monitoring/v1/gateways/{serial_number}/vlans/{vlan_id} |
Retrieves details for a specific gateway VLAN. |
Tunnels¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_gateway_tunnels |
GET network-monitoring/v1/gateways/{serial_number}/tunnels |
Retrieves all gateway tunnel records by handling pagination automatically. |
get_gateway_tunnels |
GET network-monitoring/v1/gateways/{serial_number}/tunnels |
Retrieves a single page of gateway tunnels with optional filter and sort support. |
get_gateway_tunnel_details |
GET network-monitoring/v1/gateways/{serial_number}/tunnels/{tunnel_name} |
Retrieves details for a specific gateway tunnel. |
get_gateway_tunnel_trends |
GET network-monitoring/v1/gateways/{serial_number}/tunnels/{tunnel_name}/throughput-trendsGET network-monitoring/v1/gateways/{serial_number}/tunnels/{tunnel_name}/status-trendsGET network-monitoring/v1/gateways/{serial_number}/tunnels/{tunnel_name}/dropped-packet-trends |
Retrieves trend data for a gateway tunnel metric (throughput, status, dropped-packets). |
get_gateway_tunnel_health_summary |
GET network-monitoring/v1/gateways/{serial_number}/lan-tunnels-health-summaryGET network-monitoring/v1/gateways/{serial_number}/wan-tunnels-health-summary |
Retrieves LAN or WAN tunnel health summary for a gateway. |
Uplinks¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_gateway_uplinks |
GET network-monitoring/v1/gateways/{serial_number}/uplinks |
Retrieves all uplinks for a gateway with optional sort support. |
get_gateway_uplink_details |
GET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag} |
Retrieves details for a specific gateway uplink. |
get_gateway_uplink_trends |
GET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag}/throughput-trendsGET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag}/wan-compression-trendsGET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag}/wan-availability-trends |
Retrieves trend data for a gateway uplink metric (throughput, wan-compression, wan-availability). |
get_gateway_uplink_vpn_availability_trends |
GET network-monitoring/v1/gateways/{serial_number}/uplinks/{vlan_id}/vpn-availability-trends |
Retrieves VPN availability trends for a gateway uplink using a VLAN identifier. |
get_gateway_uplink_probes |
GET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag}/probes |
Retrieves probe definitions for a specific gateway uplink. |
get_gateway_uplink_probe_performance_trends |
GET network-monitoring/v1/gateways/{serial_number}/uplinks/{link_tag}/probes/{probe}/performance-trends |
Retrieves performance trends for a specific gateway uplink probe. |
DHCP¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_gateway_dhcp_pools |
GET network-monitoring/v1/gateways/{serial_number}/dhcp-pools |
Retrieves all gateway DHCP pool records by handling pagination automatically. |
get_gateway_dhcp_pools |
GET network-monitoring/v1/gateways/{serial_number}/dhcp-pools |
Retrieves a single page of gateway DHCP pools with optional sort support. |
get_all_gateway_dhcp_clients |
GET network-monitoring/v1/gateways/{serial_number}/dhcp-clients |
Retrieves all gateway DHCP client records by handling pagination automatically. |
get_gateway_dhcp_clients |
GET network-monitoring/v1/gateways/{serial_number}/dhcp-clients |
Retrieves a single page of gateway DHCP clients with optional filter and sort support. |
Clusters¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_cluster_members |
GET network-monitoring/v1/clusters/{cluster_name}/members |
Retrieves all cluster member records by handling pagination automatically. |
get_cluster_members |
GET network-monitoring/v1/clusters/{cluster_name}/members |
Retrieves a single page of cluster members with optional filter and sort support. |
get_all_cluster_tunnels |
GET network-monitoring/v1/clusters/{cluster_name}/tunnels |
Retrieves all cluster tunnel records by handling pagination automatically. |
get_cluster_tunnels |
GET network-monitoring/v1/clusters/{cluster_name}/tunnels |
Retrieves a single page of cluster tunnels with optional filter and sort support. |
get_cluster_vlan_mismatch |
GET network-monitoring/v1/clusters/{cluster_name}/vlan-mismatch |
Retrieves VLAN mismatch details for a cluster. |
get_cluster_connectivity_graph |
GET network-monitoring/v1/clusters/{cluster_name}/connectivity-graph |
Retrieves connectivity graph details for a cluster. |
get_cluster_tunnel_summary |
GET network-monitoring/v1/clusters/{cluster_name}/tunnels-health-summaryGET network-monitoring/v1/clusters/{cluster_name}/tunnels-status-summary |
Retrieves cluster tunnel health or status summary. |
get_cluster_capacity_trends |
GET network-monitoring/v1/clusters/{cluster_name}/capacity-trendsGET network-monitoring/v1/clusters/{cluster_name}/capacity-trends/{serial_number} |
Retrieves cluster capacity trends, optionally scoped to a specific cluster member by serial number. |
Module Reference¶
gateways
¶
MonitoringGateways
¶
get_all_gateways(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all gateways, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateways(central_conn, filter_str=None, sort=None, limit=GATEWAY_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateways.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_details(central_conn, serial_number)
staticmethod
¶
Get details for a specific gateway.
Source code in pycentral/new_monitoring/gateways.py
get_all_gateway_ports(central_conn, serial_number, filter_str=None, sort=None)
staticmethod
¶
Retrieve all gateway ports, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_ports(central_conn, serial_number, filter_str=None, sort=None, limit=GATEWAY_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateway ports.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_port_details(central_conn, serial_number, port_number)
staticmethod
¶
Get details for a specific gateway port.
Source code in pycentral/new_monitoring/gateways.py
get_all_gateway_vlans(central_conn, serial_number, filter_str=None, sort=None)
staticmethod
¶
Retrieve all gateway VLANs, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_vlans(central_conn, serial_number, filter_str=None, sort=None, limit=GATEWAY_VLAN_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateway VLANs.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_vlan_details(central_conn, serial_number, vlan_id)
staticmethod
¶
Get details for a specific gateway VLAN.
Source code in pycentral/new_monitoring/gateways.py
get_all_gateway_tunnels(central_conn, serial_number, filter_str=None, sort=None)
staticmethod
¶
Retrieve all gateway tunnels, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_tunnels(central_conn, serial_number, filter_str=None, sort=None, limit=GATEWAY_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateway tunnels.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_tunnel_details(central_conn, serial_number, tunnel_name)
staticmethod
¶
Get details for a specific gateway tunnel.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplinks(central_conn, serial_number, sort=None)
staticmethod
¶
Retrieve gateway uplinks.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplink_details(central_conn, serial_number, link_tag)
staticmethod
¶
Get details for a specific gateway uplink.
Source code in pycentral/new_monitoring/gateways.py
get_all_gateway_dhcp_pools(central_conn, serial_number, sort=None)
staticmethod
¶
Retrieve all gateway DHCP pools, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_dhcp_pools(central_conn, serial_number, sort=None, limit=GATEWAY_DHCP_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateway DHCP pools.
Source code in pycentral/new_monitoring/gateways.py
get_all_gateway_dhcp_clients(central_conn, serial_number, filter_str=None, sort=None)
staticmethod
¶
Retrieve all gateway DHCP clients, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_dhcp_clients(central_conn, serial_number, filter_str=None, sort=None, limit=GATEWAY_DHCP_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of gateway DHCP clients.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_trends(central_conn, serial_number, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a gateway metric.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_cpu_utilization(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve CPU utilization trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_memory_utilization(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve memory utilization trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_wan_availability(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve WAN availability trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_vpn_availability(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve VPN availability trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_temperature_trends(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve hardware temperature trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_stats(central_conn, serial_number, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Collect CPU, memory, and WAN availability trends for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_latest_gateway_stats(central_conn, serial_number)
staticmethod
¶
Get the latest gateway statistics.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_port_trends(central_conn, serial_number, port_number, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a gateway port metric.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_tunnel_trends(central_conn, serial_number, tunnel_name, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a gateway tunnel metric.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplink_trends(central_conn, serial_number, link_tag, metric, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve trend data for a gateway uplink metric.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplink_vpn_availability_trends(central_conn, serial_number, vlan_id, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve uplink VPN availability trends using VLAN identifier.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplink_probes(central_conn, serial_number, link_tag, filter_str=None, site_id=None)
staticmethod
¶
Retrieve probe definitions for a gateway uplink.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_uplink_probe_performance_trends(central_conn, serial_number, link_tag, probe, start_time=None, end_time=None, duration=None, site_id=None, return_raw_response=False)
staticmethod
¶
Retrieve performance trends for a gateway uplink probe.
Source code in pycentral/new_monitoring/gateways.py
get_gateway_tunnel_health_summary(central_conn, serial_number, tunnel_type='lan')
staticmethod
¶
Retrieve tunnel health summary for a gateway.
Source code in pycentral/new_monitoring/gateways.py
get_all_cluster_members(central_conn, cluster_name, filter_str=None, sort=None)
staticmethod
¶
Retrieve all cluster members, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_members(central_conn, cluster_name, filter_str=None, sort=None, limit=CLUSTER_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of cluster members.
Source code in pycentral/new_monitoring/gateways.py
get_all_cluster_tunnels(central_conn, cluster_name, filter_str=None, sort=None)
staticmethod
¶
Retrieve all cluster tunnels, handling pagination.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_tunnels(central_conn, cluster_name, filter_str=None, sort=None, limit=CLUSTER_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of cluster tunnels.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_vlan_mismatch(central_conn, cluster_name, filter_str=None)
staticmethod
¶
Retrieve VLAN mismatch details for a cluster.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_connectivity_graph(central_conn, cluster_name)
staticmethod
¶
Retrieve connectivity graph details for a cluster.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_tunnel_summary(central_conn, cluster_name, summary_type='health')
staticmethod
¶
Retrieve cluster tunnel health or status summary.
Source code in pycentral/new_monitoring/gateways.py
get_cluster_capacity_trends(central_conn, cluster_name, serial_number=None, start_time=None, end_time=None, duration=None, return_raw_response=False)
staticmethod
¶
Retrieve cluster capacity trends.
Source code in pycentral/new_monitoring/gateways.py
Sites¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_sites |
GET network-monitoring/v1/sites-health |
Retrieves all sites, including health details, by handling pagination automatically. |
get_sites |
GET network-monitoring/v1/sites-health |
Retrieves a single page of site health information. |
list_sites_device_health |
GET network-monitoring/v1/sites-device-health |
Retrieves per-site device health statistics (count of poor, fair, and good devices). |
list_site_information |
GET network-monitoring/v1/site-health/{site_id} |
Retrieves detailed health information for a specific site. |
Module Reference¶
sites
¶
MonitoringSites
¶
get_all_sites(central_conn, return_raw_response=False)
staticmethod
¶
Retrieve all sites information including health details, handling pagination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
return_raw_response
|
bool
|
If True, return the raw API payloads. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of site records. If return_raw_response is False, each site response is simplified via simplified_site_resp. |
Source code in pycentral/new_monitoring/sites.py
get_sites(central_conn, limit=SITE_LIMIT, offset=0)
staticmethod
¶
Retrieve a single page of site health information. It returns details such as devices, clients, critical alerts with count, along with their respective health and health reasons for each site.
This method makes an API call to the following endpoint - GET network-monitoring/v1/sites-health
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
limit
|
int
|
Number of entries to return (default is 100). |
SITE_LIMIT
|
offset
|
int
|
Number of entries to skip for pagination (default is 0). |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response for the requested page (typically contains 'items' and 'total'). |
Source code in pycentral/new_monitoring/sites.py
list_sites_device_health(central_conn, limit=100, offset=0)
staticmethod
¶
Retrieve per-site device health statistics. It returns the number of poor, fair, and good performing devices for each site.
This method makes an API call to the following endpoint - GET network-monitoring/v1/sites-device-health
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
limit
|
int
|
Number of entries to return (default is 100). |
100
|
offset
|
int
|
Number of entries to skip for pagination (default is 0). |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response containing device health counts per site. |
Source code in pycentral/new_monitoring/sites.py
list_site_information(central_conn, site_id)
staticmethod
¶
Retrieve detailed health information for a specific site. It returns details such as devices, clients, critical alerts with count, along with their respective health and health reasons.
This method makes an API call to the following endpoint - GET network-monitoring/v1/site-health/{site_id}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
int
|
Identifier of the site to query. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Raw API response with site health details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If site_id is missing or not an integer. |
Source code in pycentral/new_monitoring/sites.py
Switches¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_switches |
GET network-monitoring/v1/switches |
Retrieves all switches by paging through the switch listing endpoint. |
get_switches |
GET network-monitoring/v1/switches |
Retrieves a single page of switch records with optional filter and sort support. |
get_switch_details |
GET network-monitoring/v1/switches/{serial_number} |
Retrieves details for a specific switch by serial number, stack ID, or conductor serial. |
get_stack_members |
GET network-monitoring/v1/stack/{serial_number}/members |
Retrieves stack member details for a given stack ID or conductor serial. |
get_switch_hardware_categories |
GET network-monitoring/v1/switches/{serial_number}/hardware-categories |
Retrieves hardware details for a specific switch. |
get_switch_lag |
GET network-monitoring/v1/switches/{serial_number}/lag |
Retrieves link aggregation group (LAG) summary details for a specific switch. |
get_switch_interfaces |
GET network-monitoring/v1/switches/{serial_number}/interfaces |
Retrieves interface details for a specific switch with optional filter, search, and sort support. |
get_switch_vlans |
GET network-monitoring/v1/switches/{serial_number}/vlans |
Retrieves VLAN details for a specific switch with optional filter, search, and sort support. |
get_switch_interface_poe |
GET network-monitoring/v1/switches/{serial_number}/interface-poe |
Retrieves interface PoE details for a specific switch. |
get_switch_vsx |
GET network-monitoring/v1/switches/{serial_number}/vsx |
Retrieves Virtual Switching Extension (VSX) configuration and operational details for a specific switch. |
get_topn_interface_trends |
GET network-monitoring/v1/switches/topn-interface-trends |
Retrieves top-N switch interface trends (rx bytes, tx bytes) for a site over a given time period. |
get_switch_interface_trends |
GET network-monitoring/v1/switches/{serial_number}/interface-trends |
Retrieves interface trend data (RX/TX bytes, discards, errors, etc.) for a specific switch. |
get_switch_hardware_trends |
GET network-monitoring/v1/switches/{serial_number}/hardware-trends |
Retrieves hardware trend data (CPU, memory, PoE) for a specific switch. |
Module Reference¶
switches
¶
MonitoringSwitches
¶
get_all_switches(central_conn, filter_str=None, sort=None)
staticmethod
¶
Retrieve all switches, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/switches
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
Optional filter expression (supported fields documented in API Reference Guide). See get_switches() for supported fields and operators. |
None
|
sort
|
str
|
Optional sort parameter. See get_switches() for supported fields. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of switch items. |
Source code in pycentral/new_monitoring/switches.py
get_switches(central_conn, filter_str=None, sort=None, limit=SWITCH_LIMIT, next_page=1)
staticmethod
¶
Retrieve a single page of switches associated to a customer, based on the query parameters provided.
This method makes an API call to the following endpoint - GET network-monitoring/v1/switches
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
filter_str
|
str
|
OData Version 4.0 filter string (limited functionality). Supports only 'and' conjunction ('or' and 'not' are NOT supported). Max length 256. Supported fields and operators: - siteId (eq, in), siteName (eq, in), model (eq, in), status (eq, in), deployment (eq, in). |
None
|
sort
|
str
|
Comma separated list of sort expressions. Each expression is a field name optionally followed by 'asc' or 'desc'. Max length 256. Supported fields: siteId, model, status, deployment, serialNumber, deviceName. |
None
|
limit
|
int
|
Maximum number of switches to return (0-1000, default is 1000). |
SWITCH_LIMIT
|
next_page
|
int
|
Pagination cursor for next page of resources (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response containing keys like 'items', 'total', and 'next'. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit exceeds 1000 or next_page is less than 1. |
ParameterError
|
If filter_str exceeds the maximum query length. |
ParameterError
|
If sort exceeds the maximum query length. |
Source code in pycentral/new_monitoring/switches.py
get_switch_details(central_conn, serial_number)
staticmethod
¶
Get details for a specific switch by serial number or stack ID.
In the case of stacked switches, logical switch details and trend data are also provided. The conductor serial may be used instead of a stack ID. Member-level information can be obtained using the listStackMember API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with switch details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
get_stack_members(central_conn, serial_number)
staticmethod
¶
Get stack member details for a given stack ID or conductor serial.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Stack ID or conductor serial number. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with stack member details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_hardware_categories(central_conn, serial_number)
staticmethod
¶
Get hardware details for a specific switch by serial number or stack ID.
Conductor serial may also be used instead of a stack ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with detailed hardware information. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_lag(central_conn, serial_number)
staticmethod
¶
Get link aggregation group (LAG) summary details for a specific switch by serial number or stack ID.
Conductor serial may also be used instead of a stack ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with LAG summary details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_interfaces(central_conn, serial_number, filter_str=None, search=None, sort=None, limit=SWITCH_LIMIT, offset=0)
staticmethod
¶
Get interface details for a specific switch by serial number or stack ID.
Conductor serial may also be used instead of a stack ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
filter_str
|
str
|
OData Version 4.0 filter string (limited functionality). Supports only 'and' conjunction ('or' and 'not' are NOT supported). Max length 256. Supported fields and operators: - name, speed, status, connector, duplex, lag, vlanmode, neighbourFamily, neighbourFunction, poeClass, poeStatus, operStatus (eq, in). |
None
|
search
|
str
|
Partial or full string free text search. Max length 256. |
None
|
sort
|
str
|
Comma separated list of sort expressions. Each expression is a field name optionally followed by 'asc' or 'desc'. Max length 256. Default sort by name. Supported fields: port, speed, neighbour, neighbourFamily, nativeVlan, neighbourRole, alias, connector, lag, vlanMode, poeClass, ipv4, mtu. |
None
|
limit
|
int
|
Number of interfaces to return (0-1000, default is 1000). |
SWITCH_LIMIT
|
offset
|
int
|
Number of interfaces to skip (default is 0). |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
API response with a list of interfaces. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
ParameterError
|
If limit exceeds 1000. |
ParameterError
|
If filter_str, search, or sort exceed the maximum query length. |
Source code in pycentral/new_monitoring/switches.py
get_switch_vlans(central_conn, serial_number, filter_str=None, search=None, sort=None, limit=SWITCH_LIMIT, offset=0)
staticmethod
¶
Get VLAN details for a specific switch by serial number or stack ID.
Conductor serial may also be used instead of a stack ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
filter_str
|
str
|
OData Version 4.0 filter string (limited functionality). Supports only 'and' conjunction ('or' and 'not' are NOT supported). Max length 256. Supported fields and operators: - status, voice, type (eq, in). |
None
|
search
|
str
|
Partial or full string free text search. Max length 256. |
None
|
sort
|
str
|
Comma separated list of sort expressions. Each expression is a field name optionally followed by 'asc' or 'desc'. Max length 256. Default sort by id. Supported fields: name, id, status, type, ipv4. |
None
|
limit
|
int
|
Number of VLANs to return (0-1000, default is 1000). |
SWITCH_LIMIT
|
offset
|
int
|
Number of VLANs to skip (default is 0). |
0
|
Returns:
| Type | Description |
|---|---|
dict
|
API response with a list of VLANs. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
ParameterError
|
If limit exceeds 1000. |
ParameterError
|
If filter_str, search, or sort exceed the maximum query length. |
Source code in pycentral/new_monitoring/switches.py
get_topn_interface_trends(central_conn, site_id=None, start_time=None, end_time=None, duration=None, return_raw_response=False)
staticmethod
¶
Get top-N switch interface trends (rx bytes, tx bytes) for a site over a given time period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str
|
ID of the site for which switch-related information is requested. |
None
|
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string (e.g. '3h') or seconds for relative queries. |
None
|
return_raw_response
|
bool
|
If True, return raw API response; otherwise return processed and sorted trend data. Default is False. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns raw API response; otherwise returns merged, sorted trend statistics. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None. |
ParameterError
|
If start_time/end_time/duration arguments are invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_interface_trends(central_conn, serial_number, site_id=None, interface_id=None, uplink=None, start_time=None, end_time=None, duration=None, return_raw_response=False)
staticmethod
¶
Get interface trend data for a specific switch by serial number or stack ID.
When a stack ID or conductor serial is provided, trends are aggregated across the entire stack. When a member serial is provided, trends are aggregated for that specific member. Supported metrics include RX bytes, TX bytes, discards, giants, errors, runts, and collisions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
site_id
|
str
|
ID of the site for which switch-related information is requested. |
None
|
interface_id
|
str
|
Interface name of the switch. |
None
|
uplink
|
bool
|
Filter by uplink status of the interface. |
None
|
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string (e.g. '3h') or seconds for relative queries. |
None
|
return_raw_response
|
bool
|
If True, return raw API response; otherwise return processed and sorted trend data. Default is False. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns raw API response; otherwise returns merged, sorted trend data. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
ParameterError
|
If start_time/end_time/duration arguments are invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_hardware_trends(central_conn, serial_number, site_id=None, start_time=None, end_time=None, duration=None, return_raw_response=False)
staticmethod
¶
Get hardware trend data for a specific switch by serial number or stack ID.
When a stack ID or conductor serial is provided, trends are aggregated for each member of the stack. When a member serial is provided, trends are aggregated for that specific member. Available metrics include CPU utilization, memory utilization, PoE available, PoE consumption, and total power available. By default, data is aggregated over the last three hours.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
site_id
|
str
|
ID of the site for which switch-related information is requested. |
None
|
start_time
|
int
|
Start time (epoch seconds) for range queries. |
None
|
end_time
|
int
|
End time (epoch seconds) for range queries. |
None
|
duration
|
str | int
|
Duration string (e.g. '3h') or seconds for relative queries. |
None
|
return_raw_response
|
bool
|
If True, return raw API response; otherwise return processed and sorted trend data. Default is False. |
False
|
Returns:
| Type | Description |
|---|---|
dict | list
|
If return_raw_response is True returns raw API response; otherwise returns merged, sorted trend data. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
ParameterError
|
If start_time/end_time/duration arguments are invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_interface_poe(central_conn, serial_number)
staticmethod
¶
Get interface PoE details for a specific switch by serial number or stack ID.
Conductor serial may also be used instead of a stack ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch (standalone), stack ID, or conductor serial (stacked). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with interface PoE details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
get_switch_vsx(central_conn, serial_number)
staticmethod
¶
Get Virtual Switching Extension (VSX) details for a specific switch.
Returns VSX configuration and operational details for the specified switch. If the switch does not support VSX or VSX is not configured, the API returns a 200 response with an empty VSX object (all fields null).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
serial_number
|
str
|
Serial number of the switch. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
API response with VSX configuration and operational details. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If central_conn is None or serial_number is missing/invalid. |
Source code in pycentral/new_monitoring/switches.py
WLANs¶
| Method | API Endpoint(s) | Description |
|---|---|---|
get_all_wlans |
GET network-monitoring/v1/wlans |
Retrieves all WLAN records by paging through the WLAN listing endpoint. |
get_wlans |
GET network-monitoring/v1/wlans |
Retrieves a single page of WLAN records with optional site, AP serial, filter, and sort criteria. |
Module Reference¶
wlans
¶
WLAN
¶
get_all_wlans(central_conn, site_id=None, serial_number=None, filter_str=None, sort=None)
staticmethod
¶
Retrieve all WLANs associated to a customer, handling pagination.
This method retrieves all results by repeatedly calling the following endpoint -
GET network-monitoring/v1/wlans
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str
|
Site identifier to filter WLANs. |
None
|
serial_number
|
str
|
Serial number of an AP to filter WLANs. |
None
|
filter_str
|
str
|
Optional filter expression for the WLAN list. |
None
|
sort
|
str
|
Optional sort expression for the WLAN list. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
List of WLAN items. |
Source code in pycentral/new_monitoring/wlans.py
get_wlans(central_conn, site_id=None, serial_number=None, filter_str=None, sort=None, limit=WLAN_LIMIT, next_page=1)
staticmethod
¶
Retrieve a list of WLANs associated to a customer.
This method makes an API call to the following endpoint - GET network-monitoring/v1/wlans
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
central_conn
|
NewCentralBase
|
Central connection object. |
required |
site_id
|
str
|
ID of the Site for which WLAN information is requested. Max length 128. |
None
|
serial_number
|
str
|
Serial number of an access point device. Max length 16. |
None
|
filter_str
|
str
|
OData Version 4.0 filter string (limited functionality). Supports only 'and' conjunction ('or' and 'not' are NOT supported). Supported field: band (operators: eq, in). Max length 256. |
None
|
sort
|
str
|
Comma separated list of sort expressions. Supported fields: wlanName, band, status, securityLevel, security, vlan, primaryUsage. Max length 256. |
None
|
limit
|
int
|
Maximum number of WLANs to return (0-1000, default is 1000). |
WLAN_LIMIT
|
next_page
|
int
|
Pagination cursor for next page (default is 1). |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
API response containing: - items (list): List of WLAN dictionaries with fields like wlanName, primaryUsage, securityLevel, security, band, status, vlan, id, type. - count (int): Number of WLANs in current response. - total (int): Total number of WLANs matching the criteria. - next (str|None): Pagination cursor for the next page. |
Raises:
| Type | Description |
|---|---|
ParameterError
|
If limit exceeds 1000 or next_page is less than 1. |
ParameterError
|
If site_id exceeds 128 characters. |
ParameterError
|
If serial_number exceeds 16 characters. |
ParameterError
|
If filter_str exceeds 256 characters. |
ParameterError
|
If sort exceeds 256 characters. |