Available Endpoints
- GET /status — Check if the API is online
- POST /echo — Echo your request payload
- GET /whoami — Return metadata about your request
- GET /random — Return a random value
- POST /hash — Hash a string using SHA-256
- GET /timestamp — Get the current UTC timestamp
API Reference
/status
Returns server uptime and current UTC time.
{
"status": "online",
"uptime_seconds": 452,
"server_time_utc": "2025-06-25T20:45:30Z"
}
/echo
Send it JSON, get it right back. Useful for debugging clients.
Request:
POST /echo
{
"message": "hello"
}
Response:
{
"you_sent": {
"message": "hello"
},
"timestamp": "2025-06-25T20:45:30Z"
}
/whoami
Returns your IP address, user agent, and request headers.
{
"ip": "127.0.0.1",
"user_agent": "Mozilla/5.0...",
"headers": {
"accept": "*/*",
"host": "localhost:8000"
}
}
/random
Returns a fresh UUID, a random number, and a short phrase.
{
"uuid": "e6e0d9f7-9af8-4b7e-bf3d-2a1c1bcd8cb2",
"number": 73,
"phrase": "Design it. Build it. Test it. Break it.",
"timestamp": "2025-06-25T20:45:30Z"
}
/hash
Returns the MD5 and SHA-256 hash of any input string.
Request:
POST /hash
{
"input": "komiko"
}
Response:
{
"md5": "e2163e6b87cf921e4bb6a3c51be1020f",
"sha256": "b6b78c8fc24a5098d6a29e960fd87fcf0f27d22ac816d4202090dc84464cb29b"
}
/timestamp
Returns current UTC time and Unix timestamp.
{
"utc": "2025-06-25T20:45:30Z",
"unix": 1750879530
}