API Reference - Users Activity Log
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108139
← Back to API Reference | Getting Started
Users Activity Log
The Users Activity Log records platform events for individual members, such as logins, profile updates, and other tracked interactions. This is an append-only logging table — records are written automatically by the platform as activity occurs. While the API exposes create, update, and delete endpoints, typical usage is read-only.
users_log — DB table: users_logThe Users Activity Log Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique log record ID (primary key, read-only) |
user_id | integer | ID of the member associated with this activity |
cookie | string | Visitor session cookie value at the time of the event |
activity | text | Description of the activity (EG Log In, Profile Updated) |
type | string | Activity category (EG Account, Profile) |
date | string | Timestamp of the activity (format: YYYYMMDDHHmmss) |
data | text | Additional structured data associated with the event; may be empty |
httpr | string | HTTP referrer URL at the time of the event |
page | string | Page path where the activity occurred |
List Activity Log Records
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/users_log/get?property=user_id&property_value=42&limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "101",
"user_id": "42",
"cookie": "",
"activity": "Log In",
"type": "Account",
"date": "20240401120000",
"data": "",
"httpr": "https://www.yourdomain.com/admin/viewMembers.php",
"page": "/login/token/abc123/home"
}
],
"total": "58",
"current_page": 1,
"total_pages": 3,
"next_page": "MipfKjI1"
}Retrieve an Activity Log Record
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/users_log/get/101" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "101",
"user_id": "42",
"cookie": "",
"activity": "Log In",
"type": "Account",
"date": "20240401120000",
"data": "",
"httpr": "https://www.yourdomain.com/admin/viewMembers.php",
"page": "/login/token/abc123/home"
}
],
"total": "58",
"current_page": 1,
"total_pages": 1
}Create an Activity Log Record
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/users_log/create" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=42" \ -d "activity=Log+In" \ -d "type=Account" \ -d "date=20240401120000" \ -d "page=%2Flogin%2Fhome"
Example Response
{
"status": "success",
"message": {
"id": "102",
"user_id": "42",
"cookie": null,
"activity": "Log In",
"type": "Account",
"date": "20240401120000",
"data": null,
"httpr": null,
"page": "/login/home"
}
}Update an Activity Log Record
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/users_log/update" \ -H "X-Api-Key: your-api-key-here" \ -d "id=102" \ -d "activity=Profile+Updated"
Example Response
{
"status": "success",
"message": {
"id": "102",
"user_id": "42",
"activity": "Profile Updated"
}
}Delete an Activity Log Record
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/users_log/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "id=102"
Example Response
{
"status": "success",
"message": "users_log record was deleted"
}