Skip to content

MngGetJournalByFilter

Returns a page of structured operational Journal records. The method reads the daily Journal files whose UTC dates intersect the requested Unix time range.

Journal contains product and business operations. Technical diagnostics remain in the server logger and are not returned by this method.

Access Control

The action requires:

  • manager session: SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, or SESSION_CRM_ADMIN;
  • logs permission, except for SuperAdmin;
  • BackOffice or CRM application access.

Visibility is always restricted on the server before offset and limit are applied:

  • SuperAdmin can see all records;
  • Brand Admin can see only its brand and the domains available through its BackOffice/CRM access;
  • a regular BackOffice manager or dealer can see trading, account and finance records only for allowed groups;
  • a regular CRM manager can see customer, KYC, marketing and finance records only for allowed desks;
  • records without enough resource scope are hidden from regular managers.

The client-provided brand, group, and desk_id filters never expand the manager's server-side scope.

Request Parameters

Name Type Required Description
from int64 Yes Inclusive Unix timestamp in seconds; must be >= 0
to int64 Yes Inclusive Unix timestamp in seconds; must be >= from
limit int Yes Page size from 1 to 1000
offset int No Number of visible matching records to skip; default 0
direction string No ASC or DESC; default DESC
brand string No Exact brand filter
domain string No Exact domain, for example trading, accounts, customers, kyc, marketing, finance, or configuration
action string No Exact action name, for example TradeProtectionActivated
status int No Journal status: 0 accepted, 1 succeeded, 2 rejected, 3 failed
actor_type int No Exact session/actor type
actor_id string No Exact actor identifier
request_id string No Exact request correlation identifier
channel string No Exact source channel, for example tcp, http, or core
entity_type string No Exact entity type, for example customer, account, group, or trade
entity_id string No Exact entity identifier
customer_id int No Exact customer id; filtering is applied when value is greater than zero
login int No Exact account login; filtering is applied when value is greater than zero
group string No Exact account group
desk_id int No Exact CRM desk id; filtering is applied when value is greater than zero
search string No Case-insensitive token search with implicit AND, quoted phrases, and exact field prefixes; maximum 512 characters

Search syntax

Unqualified words are case-insensitive and may occur in any searchable Journal field. Every word is required, but their order and fields do not matter:

7777587 EURUSD

This matches a record only when both 7777587 and EURUSD are present. For example, the first value can match login while the second matches changes_json or detail.

Text enclosed in double quotes is treated as one phrase:

l:7777587 "stop loss"

Field prefixes perform an exact, case-insensitive field match. Numeric fields must equal the requested number.

Prefix Exact Journal field
l:, login: login
c:, customer:, customer_id: customer_id
b:, brand: brand
g:, group: group
d:, domain: domain
a:, action: action
actor: actor_id or actor_name
ip: ip
entity: entity_id
type:, entity_type: entity_type
request:, request_id: request_id
channel: channel
status: Numeric status or accepted, succeeded, rejected, failed
result:, result_code: result_code
desk:, desk_id: desk_id

Examples:

l:7777587 EURUSD
customer:80 password
action:TradeProtectionActivated EURUSD
domain:finance status:succeeded deposit
actor:"John Dealer" withdrawal

An unknown prefix is treated as ordinary searchable text rather than producing an error. Unqualified search covers all Journal columns, including numeric login, customer_id, desk_id, status, and result_code. Legacy request fields remain available and are combined as: time range AND ACL AND field filters AND search terms.

Request

{
  "command": "MngGetJournalByFilter",
  "extID": "journal-page-1",
  "data": {
    "from": 1789516800,
    "to": 1789603199,
    "limit": 100,
    "offset": 0,
    "direction": "DESC",
    "search": "l:33005357 EURUSD"
  }
}

Response

The response uses the standard table representation. Every item in rows matches the field at the same index in structure.

{
  "structure": [
    "schema_version",
    "timestamp",
    "event_id",
    "brand",
    "domain",
    "action",
    "status",
    "actor_type",
    "actor_id",
    "actor_name",
    "session_id",
    "request_id",
    "channel",
    "ip",
    "user_agent",
    "device_id",
    "entity_type",
    "entity_id",
    "customer_id",
    "login",
    "group",
    "desk_id",
    "result_code",
    "changes_json",
    "detail"
  ],
  "rows": [
    [
      1,
      1789544721,
      "1789540000-1234-1",
      "ion4",
      "trading",
      "TradeProtectionActivated",
      0,
      4,
      "33005357",
      "",
      "",
      "",
      "core",
      "",
      "",
      "",
      "trade",
      "181673",
      0,
      33005357,
      "real-usd",
      0,
      0,
      "{\"activation\":\"SO\",\"activation_code\":3,\"margin_level\":18.4}",
      "SO activated for order=181673 symbol=AUDNZD login=33005357"
    ]
  ],
  "offset": 0,
  "count": 1,
  "has_more": false
}

Response Fields

Name Type Description
structure string[] Ordered Journal column names
rows array[] Records represented as arrays aligned with structure
offset uint64 Applied offset
count uint64 Number of returned rows
has_more bool true when another visible matching record exists after this page

Journal record columns

Each array in rows contains the following columns in exactly the order returned in structure.

Column Type Description and example
schema_version int Journal record schema version used by readers and exporters. Current value: 1
timestamp int64 Event occurrence time in Unix seconds, for example 1789544721. If a producer supplies 0, the Journal writer sets the enqueue time
event_id string Unique Journal event identifier, for example 1789540000-1234-45123001-42. When empty, the writer generates it from writer start time, process id, monotonic timestamp, and a sequence number
brand string Tenant that owns the operation, for example ion4. Empty only for a truly global system event
domain string Stable business area used for filtering, for example trading, accounts, customers, kyc, marketing, finance, or configuration
action string Stable operation name, for example MngAddTrade, CustomerLogin, or TradeProtectionActivated
status int Normalized Journal outcome: 0 accepted, 1 succeeded, 2 rejected, 3 failed
actor_type int Platform SESSION_* type of the initiator, for example 3 for SESSION_ADMIN or 4 for SESSION_SYSTEM
actor_id string String representation of the initiator identifier, for example 27 for a manager. System-generated records may use -
actor_name string Human-readable actor name when available, for example John Dealer or risk-engine
session_id string Identifier of the authenticated session, for example ws-7f51c2 or tcp-10482. Empty for events without a client session
request_id string Correlation identifier of the originating request, for example MngAddTrade_a8f31c
channel string Transport or internal source, for example http, tcp, ws, or core
ip string Remote client IP, for example 203.0.113.42. Empty for internal system events
user_agent string HTTP/WS client User-Agent, for example Mozilla/5.0 .... Usually empty for TCP and internal operations
device_id string Client-provided or platform device identifier, for example ios-8d6f2a
entity_type string Type of the primary affected resource, for example trade, account, customer, or group
entity_id string String representation of the primary resource identifier, for example order 181673, login 33005357, or group real\\standard
customer_id int Related customer id, for example 140; 0 means not applicable or unknown
login int Related trading account login, for example 33005357; 0 means not applicable or unknown
group string Related trading group, for example real\\standard; empty when the event is not account/group scoped
desk_id int Related CRM desk id, for example 17; 0 means not applicable or unknown
result_code int Original handler or runtime result. Depending on the producer this can be an HTTP-style result such as 200 or a platform result such as RET_OK (0) or RET_FORBIDDEN
changes_json string JSON object containing a safe business-field diff or execution context, for example {"tp":{"before":0,"after":1.2385}}. It is returned as a JSON-encoded string, not as a nested response object
detail string Sanitized human-readable text or JSON context without credentials and secrets, for example TP activated at 1.2385

entity_id identifies the primary object of the event, while customer_id, login, group, and desk_id provide additional ACL and search dimensions. They can be present together. For example, a trade event can have entity_type = "trade", entity_id = "181673", login = 33005357, and group = "real\\standard".

Actor types

actor_type contains the numeric platform session type:

Value Constant Typical actor
0 SESSION_USER Trading-account user
1 SESSION_MANAGER BackOffice manager
2 SESSION_DEALER Dealer
3 SESSION_ADMIN BackOffice administrator or SuperAdmin session
4 SESSION_SYSTEM Trading core or another internal platform process
9 SESSION_CUSTOMER Customer cabinet session
10 SESSION_CRM_MANAGER CRM manager
11 SESSION_CRM_ADMIN CRM administrator
12 SESSION_AFFILIATE Affiliate cabinet session

actor_type = 3 alone does not prove that the actor is SuperAdmin. SuperAdmin is an attribute of the corresponding manager record and is applied by the server-side ACL.

Journal statuses

Value Constant Meaning
0 JOURNAL_STATUS_ACCEPTED The operation or asynchronous execution request was accepted
1 JOURNAL_STATUS_SUCCEEDED The operation completed successfully
2 JOURNAL_STATUS_REJECTED The operation was rejected by validation, permissions, or a business rule
3 JOURNAL_STATUS_FAILED Processing started but ended with a technical or execution failure

status is a normalized lifecycle value and must not be interpreted as the numeric result_code. For asynchronous actions an accepted record means the request entered the execution pipeline, not that execution has already completed.

Notes

  • Time range boundaries are inclusive.
  • File selection uses UTC dates.
  • Records are eventually consistent: a newly accepted operation becomes searchable after the asynchronous Journal writer processes it.
  • actor_type uses the platform session type integer values.
  • result_code is the original handler/core result code; status is the normalized Journal lifecycle status.
  • TradeProtectionActivated is written when the core activates TP, SL, or Stop Out. Its changes_json.activation value is TP, SL, or SO.

Errors

HTTP-style status Error Description
400 INVALID_DATA Invalid type, limit, direction, or time range
401/403 permission error Session, application scope, or logs permission is missing
500 JOURNAL_READ_ERROR Journal directory or daily file could not be read