Admin - Activity Log
Search activity logs with filters + pagination
Returns a paginated list ordered by created_at DESC. All filters are optional and AND-combined. Page size is capped at 200 server-side.
get/api/admin/activity-logs
Request
- Base URLhttps://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
- URLhttps://api.rewritelifestyle.ai/api/admin/activity-logs
- AuthHTTP bearer
Query parameters
userIdnumber
Example:42
activityTypestring
Example:food_log.create
targetTypestring
Example:food_log
targetIdstring
Example:101
actorRole'user' | 'admin' | 'coach' | 'system' | 'bridge' | 'anonymous'
successstring
Example:false
true | false; omit for both
fromstring
Example:2026-04-21T00:00:00.000Z
ISO timestamp; inclusive lower bound on created_at
tostring
Example:2026-04-22T23:59:59.999Z
ISO timestamp; inclusive upper bound on created_at
pagenumber
Example:1
limitnumber
Example:50
Response
unknown required
Example response
{
"success": true,
"page": 1,
"limit": 50,
"total": 1,
"data": [
{
"id": 9123,
"user_id": 42,
"activity_type": "food_log.create",
"actor_role": "user",
"target_type": "food_log",
"target_id": "101",
"http_method": "POST",
"http_path": "/api/food-log",
"status_code": 201,
"success": true,
"duration_ms": 87,
"ip_address": "203.0.113.7",
"user_agent": "RewriteApp/1.4.0 (iOS 17.4)",
"details": {
"food_log_id": 101
},
"created_at": "2026-04-22T12:30:00.000Z"
}
]
}Changes
No recorded changes to this operation across all 34 revisions of this API.