API Dashboard

Complete list of all available API endpoints

6
Total APIs
4
Public APIs
2
Protected APIs
2
HTTP Methods

๐Ÿ” System APIs

GET
/api/health
Health check endpoint to verify server status and get current timestamp.
Authentication: Public
Response: JSON

๐Ÿ” Authentication APIs

POST
/api/auth/register
Register a new user account. Requires username, email, and password.
Authentication: Public
Request Body: JSON
Required Fields: username, email, password
POST
/api/auth/login
Authenticate user and receive JWT token for accessing protected endpoints.
Authentication: Public
Request Body: JSON
Required Fields: email, password
Returns: JWT Token
GET
/api/auth/profile
Get current authenticated user's profile information.
Authentication: Protected
Header Required: Authorization: Bearer <token>
Response: User Profile (JSON)

๐Ÿงช Demo APIs

GET
/api/demo/protected
Demo protected route to test JWT middleware. Returns user information from the JWT token.
Authentication: Protected
Header Required: Authorization: Bearer <token>
Response: User Info (JSON)
GET
/api/demo/public
Demo public route that doesn't require authentication. Use this to compare with protected routes.
Authentication: Public
Response: JSON

๐Ÿ“– How to Use

Authentication Flow

  1. Register a new account using POST /api/auth/register
  2. Login with your credentials using POST /api/auth/login
  3. Copy the JWT token from the response
  4. Include the token in the Authorization header: Authorization: Bearer <your-token>
  5. Access protected endpoints with the token