Skip to main content

Employee Timeline API

Summary

The direct timeline endpoint returns chronological entries recorded for one employee in the current tenant.

Audience

  • Frontend developers
  • QA engineers
  • Support engineers

Reference Content

The following inventory and contract define the direct timeline endpoint.

API inventory

MethodRoutePurposeAuthenticationTenantRequestResponseMaturitySource path
GET/employee/employees/{id}/timelineGet employee timelineRequires confirmationRequiredGUID route IDApiResponse<IReadOnlyList<TimelineEntryDto>>Transitionalmicroservices/src/employee-service/Api/EmployeeDirectEndpoints.cs

Get employee timeline

  • Operation: GetEmployeeTimelineDirect.
  • Purpose / behavior: verifies that the employee exists in the current tenant, then returns timeline entries ordered by occurrence time descending.
  • Method / public route: GET /employee/employees/{id}/timeline.
  • Authentication / authorization: Bearer-capable host; endpoint enforcement and permission are Requires confirmation.
  • Tenant context: required.
  • Route parameter: id, required GUID. Query/body: none.
  • Validation: route must bind as GUID; the employee must exist in the current tenant.
  • Response: each item contains entryType, category, description, nullable metadataJson, actor, and occurredAtUtc.
  • Statuses: 200; 404 employee not found; 400 missing tenant. 401/403 are Requires confirmation.
  • Side effects: none confirmed.
  • Compatibility notes: no extracted compatibility timeline endpoint exists.

Example request:

GET /employee/employees/11111111-1111-4111-8111-111111111111/timeline
Authorization: Bearer <approved-token>

Example success response:

{"success":true,"message":"Success","data":[{"entryType":"Status","category":"Employee","description":"Status changed","metadataJson":null,"actor":"system","occurredAtUtc":"2026-07-15T08:00:00Z"}],"correlationId":"safe-correlation-id","errors":null}

Example error response:

{"success":false,"message":"Employee not found.","data":null,"correlationId":"safe-correlation-id","errors":null}

Source References

  • microservices/src/employee-service/Api/EmployeeDirectEndpoints.cs
  • microservices/src/employee-service/Application/Queries/EmployeeApplicationQueries.cs
  • microservices/src/employee-service/Infrastructure/Persistence.cs

See Also

Keywords

  • Employee timeline
  • History API
  • Timeline entries

Revision Information

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