Get event volume time series
Returns time series of event counts per source. Real-time (<=48h) queries raw events table; historical (>48h) queries pre-aggregated metrics.
GET
/metrics/volume
Returns time series of event counts per source. Real-time (<=48h) queries raw events table; historical (>48h) queries pre-aggregated metrics.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Query Parameters
source_id
string
optional
query
after
string
optional
query
before
string
optional
query
granularity
string
optional
query
Responses
200
Volume time series
application/jsonseries
object[]
REQUIRED
Array of:
granularity
string
REQUIRED
401
Unauthorized
curl -X GET 'https://hookstream.io/v1/metrics/volume' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/metrics/volume', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
response = requests.get('https://hookstream.io/v1/metrics/volume', headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://hookstream.io/v1/metrics/volume", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
200
Response
{
"series": [
"<object>"
],
"granularity": "<string>"
}
GET
/metrics/volume