ตรวจสถานะบริการ (liveness)
ใช้งานได้GET
/api/v1/healthเช็คว่าเซิร์ฟเวอร์ยังทำงานปกติหรือไม่
Headers
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| X-Request-Id | string | — | correlation id ของฝั่งคุณ — ระบบ echo กลับใน request_uuid (แนะนำให้ส่ง) |
Response
ฟิลด์ใน data
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| status | string | — | "ok" เมื่อ process ยังทำงาน |
| service | string | — | ชื่อบริการ — "web-api" เสมอ |
| version | string | — | เวอร์ชันของบริการ |
ตัวอย่าง response
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"status": "ok",
"service": "web-api",
"version": "0.0.1"
},
"request_uuid": "9c5e1a7d-3f28-4b60-8d94-e2b7c0f6a153"
}