---
title: "getMonitoringStats"
method: POST
path: "/v1/integrations/{integrationId}/monitoring/stats"
tags: ["monitoring", "integrations"]
---

# getMonitoringStats

`POST /v1/integrations/{integrationId}/monitoring/stats`

Get aggregated statistics for both inbound and outbound monitoring events for a specific integration.
Returns summary metrics for inbound (ERP sync) and outbound (webhook delivery) events,
including success/error counts and optional breakdowns.

## Path parameters

- `integrationId` string, uuid, required

## Request body

- GetMonitoringStatsRequest
  - `from_date` string, date-time — Start date for statistics period (inclusive)
  - `to_date` string, date-time — End date for statistics period (inclusive)
  - `inbound_group_by` string[] — Fields to group inbound statistics by
  - `outbound_group_by` string[] — Fields to group outbound statistics by

## Response `200`

Monitoring statistics retrieved successfully

- MonitoringStats
  - `inbound` object, required — Statistics for inbound (ERP sync) events
    - `total_events` integer, required — Total number of inbound events in the period
    - `total_correlations` integer — Total number of unique correlation IDs
    - `success_count` integer, required — Number of successful events
    - `error_count` integer, required — Number of failed events
    - `skipped_count` integer, required — Number of skipped events
    - `warning_count` integer — Number of warning events
    - `success_rate` number, float — Success rate as percentage (0-100)
    - `last_error_at` string, date-time, nullable — Timestamp of the most recent error
    - `breakdown` object[] — Statistics breakdown by requested inbound_group_by fields
  - `outbound` object, required — Statistics for outbound (webhook delivery) events
    - `total_events` integer, required — Total number of outbound events in the period
    - `success_count` integer, required — Number of successful deliveries
    - `error_count` integer, required — Number of failed deliveries
    - `pending_count` integer — Number of pending deliveries
    - `success_rate` number, float — Success rate as percentage (0-100)
    - `last_error_at` string, date-time, nullable — Timestamp of the most recent error
    - `breakdown` object[] — Statistics breakdown by requested outbound_group_by fields

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `404` — Resource not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/epilot/apis/integration-toolkit-api.md) · [All operations](https://skmtc.net/epilot/apis/integration-toolkit-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/integration-toolkit-api/versions/c24837d75096/schema)
