Files
SnarfCode/scripts/test_kuma_live.py

9 lines
322 B
Python

import requests
r1 = requests.get("http://140.44.4.28:448/api/status-page/default")
print("status-page:", r1.status_code, r1.json().get('config', {}).get('title'))
r2 = requests.get("http://140.44.4.28:448/api/status-page/heartbeat/default")
print("heartbeat:", r2.status_code, len(r2.json().get('heartbeatList', {})))