MngGetJournalHistogram¶
Returns Journal activity grouped into chronological time buckets. The method is intended for the stacked histogram displayed above the Journal record list and is independent of list pagination.
The method applies the same server-side visibility rules and filters as
MngGetJournalByFilter. A histogram therefore never
includes records that the current manager cannot retrieve in the list.
Access Control¶
The action requires a supported manager session, BackOffice or CRM access, and
the logs permission except for SuperAdmin. Brand, group, desk, and domain
visibility is restricted on the server exactly as for MngGetJournalByFilter.
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 |
bucket_seconds |
int | No | Preferred bucket width from 60 to 2592000 seconds. The server may increase it to keep the response at 300 buckets or fewer |
brand |
string | No | Exact brand filter |
domain |
string | No | Exact business domain filter |
action |
string | No | Exact action filter |
status |
int | No | Exact status: 0 accepted, 1 succeeded, 2 rejected, or 3 failed |
actor_type |
int | No | Exact actor/session type |
actor_id |
string | No | Exact actor identifier |
request_id |
string | No | Exact request correlation identifier |
channel |
string | No | Exact source channel |
entity_type |
string | No | Exact entity type |
entity_id |
string | No | Exact entity identifier |
customer_id |
int | No | Exact customer identifier when greater than zero |
login |
int | No | Exact account login when greater than zero |
group |
string | No | Exact account group |
desk_id |
int | No | Exact CRM desk identifier when greater than zero |
search |
string | No | The same case-insensitive AND search, quoted phrases, and field prefixes supported by MngGetJournalByFilter; maximum 512 characters |
limit and offset are not used. Buckets are always returned in ascending
chronological order. Clients should omit direction for this method.
If bucket_seconds is omitted, the server selects a readable interval. If it
is supplied, it is treated as a preferred minimum. The server rounds upward to
a suitable interval when necessary and always returns the effective value in
bucket_seconds. The UI must use that returned value rather than assuming that
the requested interval was accepted unchanged.
Request¶
{
"command": "MngGetJournalHistogram",
"extID": "journal-histogram-1",
"data": {
"from": 1789516800,
"to": 1789603199,
"bucket_seconds": 300,
"search": "l:33005357 EURUSD"
}
}
Response¶
{
"from": 1789516800,
"to": 1789603199,
"requested_bucket_seconds": 300,
"bucket_seconds": 300,
"max_buckets": 300,
"total": 7433,
"buckets": [
{
"from": 1789516800,
"to": 1789517099,
"accepted": 280,
"succeeded": 4324,
"rejected": 2,
"failed": 2827,
"other": 0,
"total": 7433
}
]
}
Response Fields¶
| Name | Type | Description |
|---|---|---|
from |
int64 | Applied inclusive range start |
to |
int64 | Applied inclusive range end |
requested_bucket_seconds |
int | Requested bucket width, or 0 when it was omitted |
bucket_seconds |
int64 | Effective bucket width selected by the server |
max_buckets |
int | Maximum number of buckets the server returns; currently 300 |
total |
uint64 | Total number of visible records matching all filters |
buckets |
object[] | Consecutive chronological buckets, including buckets with zero records |
Each bucket contains an inclusive from and to, counters for the four known
Journal statuses, an other counter for unknown or future status values, and
total, which is the sum of all counters in that bucket.
UI Usage¶
Request the histogram when the time range or any Journal filter changes. Do not
request it again when only offset, limit, or the current list page changes.
The stacked series should normally use succeeded, accepted, rejected, and
failed; other may be displayed as a neutral fallback series.
Errors¶
| HTTP-style code | Error | Meaning |
|---|---|---|
400 |
INVALID_DATA |
Invalid time range, filter, or bucket width |
403 |
RET_NOT_ENOUGH_RIGHTS |
The manager cannot access Journal data |
500 |
JOURNAL_READ_ERROR |
One or more Journal files could not be read |