Skip to content

Get log stats

GET
/logs/{log_id}/stats

Returns statistics for a log including event count, bytes stored, and timestamps. Use to monitor storage usage.

log_id
required
string format: uuid

Log ID (UUID)

Log statistics

Log statistics response. Provides current storage state.

object
archived_bytes
required

Bytes stored in S3 archives. Included in bytes total.

integer format: int64
bytes
required

Total bytes stored across NATS and S3 archives.

integer format: int64
created_at
required

Unix timestamp when the log was created. Immutable.

integer format: int64
event_count
required

Total number of events in the log (archived + live). Accurate at time of query.

integer format: int64
first_event_at

Unix timestamp of first event. Null if log is empty.

integer | null format: int64
last_event_at

Unix timestamp of last event. Null if log is empty.

integer | null format: int64
log_id
required

Log ID (UUID).

string
log_name
required

Log name. Immutable.

string
nats_message_count
required

Number of events currently in NATS (not yet archived or still live).

integer format: int64
view_count
required

Number of views attached to this log.

integer format: int64
Example
{
"archived_bytes": 1024288,
"bytes": 2048576,
"created_at": 1699900000,
"event_count": 15234,
"first_event_at": 1700000000,
"last_event_at": 1700086400,
"log_id": "550e8400-e29b-41d4-a716-446655440000",
"log_name": "order-events",
"nats_message_count": 5234,
"view_count": 3
}

Unauthorized

Log not found

Server error