Skip to content

Logs

Note

This section requires authentication. Please refer to the Authentication section for more details.

Log Object

The log object captures error and crash information occurring within the application, including stack traces, contextual data, and error metadata.

Log Object Structure

Field Type Description
id integer Unique identifier for the log
hash string Unique hash identifying the error type.
Created using: app_version, classFQN, message, and type
app_versions string Comma-separated list of app versions
classFQN string Fully qualified class name of the error
context object Additional contextual data (e.g., user ID)
file_name string Name of the file where the error occurred
line_number integer Line number in the code where error occurred
last_seen_at string Timestamp of the last occurrence in ISO8601 format
message string Human-readable error message
stack_trace string Full error stack trace
occurrences integer Total occurrences of this log entry
users_affected integer Number of unique users affected by this error

Create Log

This endpoint allows capturing a single error/crash log with associated metadata.

POST /api/logs

Headers

Header Value
Authorization Bearer {YOUR_AUTH_KEY}
Content-Type multipart/form-data
Accept application/json

Body Parameters

Required Parameters

Field Type Description Example
app_version string Version of the app where error occurred 1.0.0
classFQN string Fully qualified class name of the error App\Http\Controllers\Api\LogController
message string Descriptive error message Call to a member function get() on null
type string Error type (error or crash) error

Optional Parameters

Field Type Description Example
file_name string File name where error occurred Microsoft.Maui.Controls.Button
line_number integer Line number where error occurred 23
stack_trace string Full error stack trace System.NullReferenceException: Object...
context object Additional contextual data {"user_id": 1}
file file Associated error file (max 4MB) @/tmp/phpKx0PN6
created_at string Custom timestamp in ISO8601 format 2025-04-16T22:19:35

Example Request

JSON
{
  "app_version": "1.0.7",
  "classFQN": "excepturi",
  "file_name": "Microsoft.Maui.Controls.Button",
  "line_number": 17,
  "message": "Maxime rerum eum quas expedita nulla sed non.",
  "stack_trace": "Qui eos accusamus laudantium natus nihil quia.",
  "type": "crash",
  "context": [
    {
      "key": "exercitationem"
    }
  ]
}

Example Response

JSON
{
    "id": 1102,
    "hash": "1f876bde2fa4ea85fcf83f03514c7c19",
    "app_versions": "3.21.0 , 4.21.0",
    "classFQN": "App\\Http\\Controllers\\Api\\LogController",
    "context": {
        "user_id": 1
    },
    "file_name": "Microsoft.Maui.Controls.Button",
    "line_number": "23",
    "last_seen_at": "2025-05-20 17:56:00",
    "message": "Call to a member function get() on null new",
    "stack_trace": "System.NullReferenceException: Object reference not set to an instance of an object.at MyApp.Views.MainPage.OnButtonClicked(Object sender, EventArgs e)... ",
    "type": "error",
    "occurrences": 5,
    "users_affected": 2
}

Create Batch Logs

This endpoint allows creating multiple logs in a single request (1-100 items).

POST /api/log/batch

Headers

Header Value
Authorization Bearer {YOUR_AUTH_KEY}
Content-Type multipart/form-data
Accept application/json

Body Parameters

Required Parameters

Field Type Description Example
logs[] array Array of log entries (1-100 items) See example below

Each log entry must include:

Field Type Description Example
app_version string App version where error occurred 1.0.0
classFQN string Fully qualified class name App\Services\LogService
message string Error description Database connection failed
type string Error type (error or crash) crash
session_id integer ID of the session associated with the log 42

Optional Parameters

Field Type Description Example
file_name string Source file name error.log
line_number integer Line number in code 42
stack_trace string Full error stack trace System.NullReference...
context object Additional context data {"user_id": 1}
file file Attached log file (max 4MB) @/tmp/phpTw2Vzk
created_at string Custom timestamp in ISO8601 format 2023-10-05T12:34:56Z

Example Request

JSON
[
    {
        "app_version": "1.0.7",
        "classFQN": "excepturi",
        "file_name": "Microsoft.Maui.Controls.Button",
        "line_number": 17,
        "message": "Maxime rerum eum quas expedita nulla sed non.",
        "stack_trace": "Qui eos accusamus laudantium natus nihil quia.",
        "type": "crash",
        "context": [
            {
            "key": "exercitationem"
            }
        ],
      "session_id": 22
    },
    {
        "app_version": "1.0.8",
        "classFQN": "excepturi",
        "file_name": "Microsoft.Maui.Controls.Button",
        "line_number": 19,
        "message": "Maxime rerum eum quas expedita nulla sed non.",
        "stack_trace": "Qui eos accusamus laudantium natus nihil quia.",
        "type": "crash",
        "context": [
            {
            "key": "exercitationem"
            }
        ],
      "session_id": 23
    }
]

Example Response

JSON
{
    "message": "Logs queued for processing"
}