v4

latestOpenAPI 3.0.32026-08-0161180264.4 KB
monitoring
integrations

getMonitoringStatsV2

Get aggregated statistics from the unified erp_monitoring_v2 table. Returns combined metrics for all event types with optional breakdowns.

post/v2/integrations/{integrationId}/monitoring/stats

Path parameters

integrationIdstring uuid required

The integration ID

Request body

from_datestring date-time

Start of the time range

to_datestring date-time

End of the time range

use_case_type'inbound' | 'outbound' | 'file_proxy' | 'managed_call' | 'secure_proxy'

Filter stats by a single use case type

use_case_typesstring[]

Filter stats to this set of use case types (matches any). Takes precedence over use_case_type when both are present. Used by the notification producers to scope alerts/digests to the integration's monitoredUseCases.

group_by'use_case_id' | 'use_case_type' | 'level' | 'code' | 'date'

Field to group the breakdown by

source'monitoring' | 'incoming'

Data source for the stats. "monitoring" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). "incoming" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0).

Example request

{
  "from_date": "2025-01-01T00:00:00Z",
  "to_date": "2025-01-31T23:59:59Z"
}

Response

Monitoring statistics retrieved successfully

total_eventsinteger required

Total number of events in the period

success_countinteger required

Number of successful events

error_countinteger required

Number of error events

warning_countinteger required

Number of warning events

skipped_countinteger required

Number of skipped events

ack_timeout_countinteger

Number of ACK_TIMEOUT events (acknowledgement timed out)

success_ratenumber float

Success rate as percentage (0-100)

last_error_atstring date-time nullable

Timestamp of the most recent error

breakdownobject[]

Statistics breakdown by requested group_by field