Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Get Logs Histogram

Get histogram data for log counts bucketed by time.

Returns time-series data suitable for rendering a histogram chart.

POST/logs/histogram
Authorization
AuthorizationBearer token · headerrequired
Query parameters
timestamp_fromstringrequired

Start of time range (ISO 8601)

timestamp_tostring

End of time range (ISO 8601)

bucket_countinteger

Number of buckets

min 1 · max 100 · default: 30
log_levelstring

Comma-separated log levels

Request body
application/json
Any of:
HistogramRequestBody
source_idsstring[]
default: []
destination_idsstring[]
default: []
transform_idsstring[]
default: []
null
null
Responses
200

Successful Response

bucketsHistogramBucket[]
default: []
Show properties
Array of HistogramBucket
timestamp_startstringrequired
timestamp_endstringrequired
errorinteger
default: 0
warninteger
default: 0
infointeger
default: 0
debuginteger
default: 0
totalinteger
default: 0
total_logsinteger
default: 0
totals_by_levelTotalsByLevel | null
Show properties
Any of:
TotalsByLevel
errorinteger
default: 0
warninteger
default: 0
infointeger
default: 0
debuginteger
default: 0
null
null
time_rangeHistogramTimeRangerequired

Time range for histogram response.

Show properties
fromstringrequired
tostringrequired
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST 'https://api.streamkap.com/logs/histogram?timestamp_from=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "source_ids": [],
  "destination_ids": [],
  "transform_ids": []
}'
Response
{
  "buckets": [],
  "total_logs": 0,
  "totals_by_level": {
    "error": 0,
    "warn": 0,
    "info": 0,
    "debug": 0
  },
  "time_range": {
    "from": "string",
    "to": "string"
  }
}