How muzammil-ali09/web-api works
This is an ASP.NET Core API for authentication, employee management, and API-log retrieval. A client sends requests through the configured application pipeline to controller endpoints: authentication issues and refreshes JWTs, employee endpoints perform paginated CRUD operations, and log queries filter and paginate captured request records. Controllers and the logging middleware access SQL Server directly; the middleware also appends request summaries to a local file. The excerpts show these paths, but do not establish the database schema or deployment topology.
Main entry points: AuthController.cs Auth endpoints · Program.cs ASP.NET pipeline · EmployeeController.cs Employee endpoints · LogsController.cs Log query endpoint
Components 12
API runtime
- ASP.NET pipeline
Program.cs
Identity
- Auth endpoints
Controllers/AuthController.cs - Login request
Models/LoginRequest.cs - Refresh token model
Models/RefreshToken.cs
Employee management
- Employee endpoints
Controllers/EmployeeController.cs - Employee model
Models/Employee.cs
Request logging
- Request logger
Middleware/ApiLoggingMiddleware.cs.cs - Log query endpoint
Controllers/LogsController.cs - API log model
Models/ApiLog.cs
Other components
- API client
- SQL Server
- Local log file
Connections 16
- ASP.NET pipeline → Auth endpoints: routes requests
Program.cs - ASP.NET pipeline → Employee endpoints: routes requests
Program.cs - ASP.NET pipeline → Log query endpoint: routes requests
Program.cs - API client → Auth endpoints: calls auth routes
Controllers/AuthController.cs - API client → Employee endpoints: calls employee routes
Controllers/EmployeeController.cs - API client → Log query endpoint: calls log route
Controllers/LogsController.cs - Auth endpoints → SQL Server: reads and writes tokens
Controllers/AuthController.cs - Auth endpoints → Login request: accepts login data
Controllers/AuthController.cs - Auth endpoints → Refresh token model: uses refresh tokens
Controllers/AuthController.cs - Employee endpoints → SQL Server: executes CRUD procedure
Controllers/EmployeeController.cs - Employee endpoints → Employee model: maps employee data
Controllers/EmployeeController.cs - ASP.NET pipeline → Request logger: registers middleware
Program.cs - Request logger → SQL Server: writes request records
Middleware/ApiLoggingMiddleware.cs.cs - Request logger → Local log file: appends request summaries
Middleware/ApiLoggingMiddleware.cs.cs - Log query endpoint → SQL Server: queries log records
Controllers/LogsController.cs - Log query endpoint → API log model: maps query results
Controllers/LogsController.cs