Ping API
Health check endpoint for the server.
GET /v1/ping
Overview
Health check endpoint for the server.
Request and Response
Headers
Request Headers
None
Response Headers
Content-Type: application/json
URI
Request Body
None
Response
Response is JSON.
Authentication
This endpoint does not require authentication.
Error Handling
| Description | Status Code | Status Name |
|---|---|---|
| Internal server error | 500 | Internal Server Error |
Processing Flow
- Receive the request
- Return
{ "message": "pong" }
Detailed Flowchart
flowchart TD
Start([GET /v1/ping]) --> Route[Route Handler]
Route --> Success[200 OK<br/>pong]
GET /v1/ping/deep
Overview
Health check endpoint for the server and DB.
Request and Response
Headers
Request Headers
None
Response Headers
Content-Type: application/json
URI
Request Body
None
Response
Response is JSON.
200 OK
503 Service Unavailable (when DB connection fails)
Authentication
This endpoint does not require authentication.
Error Handling
| Description | Status Code | Status Name |
|---|---|---|
| DB connectivity check failed | 503 | Service Unavailable |
The implementation catches the DB error and returns {"message": "pong", "db": "error"} with 503,
so this endpoint never returns 500.
Processing Flow
- Receive the request
- Check DB connectivity
- Return the result
flowchart TD
Start([GET /v1/ping/deep]) --> DBCheck[Check DB connectivity]
DBCheck -->|success| Success[200 OK<br/>db: ok]
DBCheck -->|failure| E503[503 Service Unavailable<br/>db: error]