Appearance
User - Activity Logs
Base URL:
https://your-domain.com
Admin endpoints for viewing system activity logs. All endpoints require admin authentication.
Fetch All Activity Logs
Retrieve all activity logs with pagination.
| Property | Value |
|---|---|
| Endpoint | Fetch All Activity Logs |
| Method | GET |
| URL | /api/v1/activity-logs |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 1,
"user_id": 1,
"user_name": "Admin",
"action": "created",
"subject_type": "Subscriber",
"subject_id": 5,
"description": "Created subscriber John Doe",
"created_at": "2024-01-15 10:30:00"
}
]
}Fetch Activity Log
Retrieve details of a specific activity log entry.
| Property | Value |
|---|---|
| Endpoint | Fetch Activity Log |
| Method | GET |
| URL | /api/v1/activity-logs/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"user_id": 1,
"user_name": "Admin",
"action": "created",
"subject_type": "Subscriber",
"subject_id": 5,
"description": "Created subscriber John Doe",
"properties": {"old": {}, "new": {"name": "John Doe"}},
"ip_address": "192.168.1.100",
"created_at": "2024-01-15 10:30:00"
}
}Fetch Logs By Subject
Get activity logs for a specific subject (entity).
| Property | Value |
|---|---|
| Endpoint | Fetch Logs By Subject |
| Method | GET |
| URL | /api/v1/activity-logs/by-subject |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
subject_type | string | Yes | Entity type (Subscriber, Package, etc.) |
subject_id | integer | Yes | Entity ID |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 1,
"action": "updated",
"user_name": "Admin",
"description": "Updated subscriber package",
"created_at": "2024-01-15 10:30:00"
}
]
}Fetch Logs By User
Get activity logs for a specific user.
| Property | Value |
|---|---|
| Endpoint | Fetch Logs By User |
| Method | GET |
| URL | /api/v1/activity-logs/by-user/{user_id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 1,
"action": "created",
"subject_type": "Subscriber",
"description": "Created subscriber John Doe",
"created_at": "2024-01-15 10:30:00"
}
]
}