5. 服务器状态接口
5.1 健康检查端点
验证 API 服务的运行状态。
端点: GET /
请求示例:
Bash
curl https://api.ndpreforged.com
Python 请求示例:
Python
import requests
response = requests.get("https://api.ndpreforged.com")
print(response.json())
# 成功响应: {"status": "running"}
成功响应 (200):
JSON
{
"status": "running"
}
错误响应 (500):
JSON
{
"error": "Server error"
}