API Documentation

Explore our available API endpoints and learn how to use them.

Health Check

GET

Check the health status of the API server

/api/health

Basic Usage

Request
curl -X GET https://your-domain.com/api/health
Response
{ "status": "ok", "timestamp": "2024-04-30T12:00:00Z" }

DateTime

GET

Get current date and time information

/api/datetime

Get Current Time

Request
curl -X GET https://your-domain.com/api/datetime
Response
{ "date": "2024-04-30", "time": "12:00:00", "timezone": "UTC" }

Get Time with Custom Timezone

Request
curl -X GET "https://your-domain.com/api/datetime?tz=Asia/Shanghai"
Response
{ "datetime": "April 30, 2025 at 23:56:52", "timestamp": 1746028612288, "timezone": "asia/shanghai" }