Get Activity Logs
curl -X GET "http://localhost:8080/api/v1/activity-logs?page=1&limit=10&entity_type=ORDER&action_type=CREATE" \
-H "Authorization: Bearer YOUR_TOKEN"
Get a list of activity logs with filtering and pagination. This endpoint is restricted to administrators only.
Query Parameters
Page number for pagination
Number of items per page (max 100)
Search term to filter logs
Start date filter in YYYY-MM-DD format
End date filter in YYYY-MM-DD format
Filter by entity type:
PRODUCT
CATEGORY
PROMOTION
ORDER
USER
SETTINGS
SHIFT
PAYMENT_METHOD
CANCELLATION_REASON
Filter by action type:
CREATE
UPDATE
DELETE
CANCEL
APPLY_PROMOTION
PROCESS_PAYMENT
REGISTER
UPDATE_PASSWORD
UPDATE_AVATAR
LOGIN_SUCCESS
LOGIN_FAILED
RESTORE
Response
Show ActivityLogListResponse
Array of activity log entries User UUID who performed the action
Username of the user who performed the action
ID of the affected entity
Additional details about the action (JSON object)
Timestamp when the action occurred
Total number of log entries
Response Example
{
"message" : "Success" ,
"data" : {
"logs" : [
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"user_id" : "660e8400-e29b-41d4-a716-446655440001" ,
"user_name" : "admin" ,
"action_type" : "CREATE" ,
"entity_type" : "ORDER" ,
"entity_id" : "770e8400-e29b-41d4-a716-446655440002" ,
"details" : {
"order_type" : "dine_in" ,
"total_amount" : 150000
},
"created_at" : "2024-01-15T14:30:00Z"
},
{
"id" : "550e8400-e29b-41d4-a716-446655440003" ,
"user_id" : "660e8400-e29b-41d4-a716-446655440001" ,
"user_name" : "admin" ,
"action_type" : "UPDATE" ,
"entity_type" : "PRODUCT" ,
"entity_id" : "880e8400-e29b-41d4-a716-446655440004" ,
"details" : {
"field_changed" : "price" ,
"old_value" : 25000 ,
"new_value" : 30000
},
"created_at" : "2024-01-15T14:25:00Z"
}
],
"total_items" : 150 ,
"total_pages" : 15 ,
"page" : 1 ,
"limit" : 10
}
}
Roles
Accessible by: admin only
Activity logs are automatically created by the system when users perform actions. This endpoint is read-only and provides audit trail functionality for administrators.