Skip to main content

API Request Lifecycle

Summary

Portal requests pass through the shared API client and gateway. Gateway route selection determines whether compatibility onboarding reaches the monolith or extracted Recruitment service. Native minimal APIs call application commands/queries; HR Operations actions execute controller logic directly.

Audience

Developers, QA, support, and solution architects.

Extracted completion sequence

Native minimal API flow

Minimal API binding creates the input object, the endpoint calls a command/query service, and the shared result mapper returns success, not-found, conflict, or bad-request results. Tenant absence is handled by host middleware. Unhandled remote-service or persistence failures do not have a lifecycle-specific response mapper.

Monolith HR Operations flow

The controller pipeline authenticates the request, resolves the current user, applies action-specific permission and visibility checks, validates state, updates tracked entities, writes audit evidence where implemented, saves, optionally calls the internal notification service, and returns an MVC action result.

Consistency boundary

The gateway does not participate in transactions. Extracted completion calls Employee Service before committing Recruitment state. HR Operations notification occurs after the exit approval save. These sequences can produce partial outcomes and require retry or reconciliation outside the HTTP response mapper.

Requires confirmation

  • Standard retry behavior for remote employee success followed by Recruitment failure.
  • Idempotency expectations for every mutating compatibility and exit action.
  • Cross-service timeout and client-cancellation behavior.
  • Operator correlation workflow across gateway, service, and message records.

Source References

  • UI/salary-ui/packages/api-client/src/axiosConfig.ts
  • microservices/src/gateway-api/Program.cs
  • microservices/src/recruitment-service/Api/RecruitmentEndpoints.cs
  • microservices/src/recruitment-service/Api/EndpointResults.cs
  • microservices/src/recruitment-service/Application/Commands/OnboardingCommands.cs
  • microservices/src/recruitment-service/Application/Compatibility/CompatCommands.cs
  • microservices/src/recruitment-service/Infrastructure/EmployeeServiceClient.cs
  • Controllers/HrOperationsController.cs

See Also

Keywords

  • Request pipeline
  • Cross-service completion
  • Result mapping

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Review cycle: Quarterly