I've not done this specifically, but here are two Platform API endpoints that may be relevant:
The first endpoint looks more useful, returning the properties below which you could derive the status from using the
Python Platform API SDK.
I'm not sure on the Python SDK call, specifically so created the pseudocode below:
connected = trunk.connected_status.connected if trunk.connected_status else None
if trunk.state != "active" or not connected or not trunk.in_service:
print(
f'[ALERT] Trunk "{trunk.name}" is DOWN: '
f"state: {trunk.state}, "
f"connected: {connected}, "
f"inService: {trunk.in_service}"
)
------------------------------
Lucas Woodward
Winner of Orchestrator of the Year, Developer (2025)
LinkedIn -
https://www.linkedin.com/in/lucas-woodward-the-devNewsletter -
https://makingchatbots.com------------------------------
Original Message:
Sent: 02-20-2026 05:52
From: Daniel Bernardi
Subject: Trunk Status via Phyton
I need check trunk state with 30 sec, if fail, shows a message on screen. Any suggestion? Can I use python for it?
#PlatformAPI
------------------------------
Daniel Bernardi
Network Designer Specialist-Cloud Applications
------------------------------