Audit & Token Management
Review recent mutations, revert supported audit records, and manage personal API tokens. Token list responses expose metadata only; plaintext token values are returned once at creation time.
Audit & Revert#
Audit log#
GET/api/audit
List the latest audit records for the user.
Request
- optional query
from,toasYYYY-MM-DDandentityasTimeEntry,DayComment, orDayFile
Response
- up to
200audit objects withid,entityType,entityId,action,previousData,newData,source, andcreatedAt
POST/api/audit/:id/revert
Revert one owned audit record where possible.
Request
- No request body.
Response
- JSON
{ success: true };400when the revert cannot be applied.
Token Management#
Plaintext tokens are returned only by POST /api/tokens. Store the value immediately; later reads return metadata only.
Tokens#
GET/api/tokens
List API tokens for the authenticated user.
Request
- No request body.
Response
- array with
id,name,lastUsedAt, andcreatedAt
POST/api/tokens
Create a token and return its plaintext value once.
Request
- JSON
{ name: string };1to100chars.
Response
201withid,name,createdAt, and plaintexttoken
DELETE/api/tokens/:id
Revoke one owned API token.
Request
- No request body.
Response
- JSON
{ success: true };404when missing or not owned.