Skip to main content
GET
/
api
/
v1
/
health
健康检查
curl --request GET \
  --url https://api.dev.akria.net/api/v1/health
{
  "status": "healthy",
  "database": "connected",
  "timestamp": "2026-02-02T10:00:00.000000"
}

Documentation Index

Fetch the complete documentation index at: https://docs.akria.net/llms.txt

Use this file to discover all available pages before exploring further.

检查 API 服务和数据库连接状态。

核心特性

无需认证

可以直接访问,无需 API Key

快速响应

用于监控和负载均衡健康检查

数据库状态

检查数据库连接状态

认证

此端点不需要 API Key 认证,可以直接访问。

请求参数

无参数。

响应

成功响应(200 OK)

{
  "status": "healthy",
  "database": "connected",
  "timestamp": "2026-02-02T10:00:00.000000"
}
  • status: 服务状态(healthy 表示正常,unhealthy 表示异常)
  • database: 数据库连接状态(connected 表示已连接,disconnected 表示未连接)
  • timestamp: 响应时间戳

数据库连接失败(503 Service Unavailable)

{
  "status": "unhealthy",
  "database": "disconnected",
  "timestamp": "2026-02-02T10:00:00.000000"
}
如果数据库连接失败,status 会变为 unhealthydatabase 会变为 disconnected。此时 API 可能无法正常工作。

使用示例

curl https://api.dev.akria.net/api/v1/health

使用场景

监控系统

定期检查服务健康状态,及时发现异常

负载均衡

作为健康检查端点,自动剔除不健康的实例

CI/CD 部署

部署后验证服务是否正常启动

故障排查

快速判断服务是否正常运行

相关文档

团队使用手册

手把手教程,适合团队使用

Core API 介绍

Core API V1 完整介绍

Response

服务正常

status
enum<string>

服务状态

Available options:
healthy,
unhealthy
database
enum<string>

数据库连接状态

Available options:
connected,
disconnected
timestamp
string<date-time>

检查时间