API Documentation
Complete API reference with live testing capabilities
ReferenceBeginner• 15 min read
API Overview
The ModernAPI template provides a comprehensive RESTful API built with ASP.NET Core 9, featuring Clean Architecture patterns and enterprise-grade security.
Base URL: https://localhost:5051/api
API Features
- • RESTful design principles
- • JWT authentication
- • OpenAPI/Swagger documentation
- • Rate limiting
- • Request validation
Response Format
- • JSON responses
- • RFC 7807 Problem Details
- • Consistent error handling
- • CORS enabled
- • Content negotiation
Available Endpoints
Core API endpoints for user management and authentication
Authentication
POST
/auth/login
Authenticate user and get JWT token
POST
/auth/refresh
Refresh JWT token
POST
/auth/logout
Logout and invalidate tokens
User Management
GET
/users
Get all users (paginated)
GET
/users/{id}
Get user by ID
PUT
/users/{id}
Update user profile
DELETE
/users/{id}
Deactivate user account
Interactive API Testing
Test the API endpoints directly from your development environment
Scalar UI (Development)
Interactive API documentation with live testing capabilities
Postman Collection
Pre-configured requests for all API endpoints
Authentication Guide
How to authenticate and make authorized requests
1. Login Request
POST /api/auth/login
Content-Type: application/json
{
"email": "admin@modernapi.dev",
"password": "AdminPassword123!"
}
2. Use JWT Token
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...