Skip to main content
POST
/
logs
/
histogram
Get Logs Histogram
curl --request POST \
  --url https://api.streamkap.com/logs/histogram \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_ids": [],
  "destination_ids": [],
  "transform_ids": []
}
'
{
  "time_range": {
    "from": "<string>",
    "to": "<string>"
  },
  "buckets": [],
  "total_logs": 0,
  "totals_by_level": {
    "error": 0,
    "warn": 0,
    "info": 0,
    "debug": 0
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

timestamp_from
string
required

Start of time range (ISO 8601)

timestamp_to
string | null

End of time range (ISO 8601)

bucket_count
integer
default:30

Number of buckets

Required range: 1 <= x <= 100
log_level
string | null

Comma-separated log levels

Body

application/json

Request body for histogram endpoint.

source_ids
string[] | null
destination_ids
string[] | null
transform_ids
string[] | null

Response

Successful Response

Response model for histogram endpoint.

time_range
HistogramTimeRange · object
required

Time range for histogram response (matches frontend spec).

buckets
HistogramBucket · object[]
total_logs
integer
default:0
totals_by_level
TotalsByLevel · object

Total log counts grouped by severity level.