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
| Method | Route | Purpose | Authentication | Tenant | Request | Response | Maturity | Source path |
|---|---|---|---|---|---|---|---|---|
| GET | /employee/employees/{id}/timeline | Get employee timeline | Requires confirmation | Required | GUID route ID | ApiResponse<IReadOnlyList<TimelineEntryDto>> | Transitional | microservices/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, nullablemetadataJson,actor, andoccurredAtUtc. - 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.csmicroservices/src/employee-service/Application/Queries/EmployeeApplicationQueries.csmicroservices/src/employee-service/Infrastructure/Persistence.cs
Related Articles
See Also
- Response and error model
- Future Employee event documentation (Not implemented)
Keywords
- Employee timeline
- History API
- Timeline entries
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly