Skip to main content
GET
/
topics
/
metrics
Get topic metrics
curl --request GET \
  --url https://api.streamkap.com/topics/metrics \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.streamkap.com/topics/metrics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.streamkap.com/topics/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.streamkap.com/topics/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.streamkap.com/topics/metrics"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.streamkap.com/topics/metrics")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.streamkap.com/topics/metrics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "timeseries": {
    "byteTotal": [],
    "SnapshotTotalNumberOfEventsSeen": [],
    "StreamingTotalNumberOfCreateEventsSeen": [],
    "StreamingTotalNumberOfDeleteEventsSeen": [],
    "StreamingTotalNumberOfUpdateEventsSeen": [],
    "recordRetryTotal": [],
    "recordSendTotal": []
  },
  "latest": {
    "byteTotal": 123,
    "SnapshotTotalNumberOfEventsSeen": 123,
    "StreamingTotalNumberOfCreateEventsSeen": 123,
    "StreamingTotalNumberOfDeleteEventsSeen": 123,
    "StreamingTotalNumberOfUpdateEventsSeen": 123,
    "recordRetryTotal": 123,
    "recordSendTotal": 123
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

timestamp_to
string | null
timestamp_from
string | null
time_type
string | null
time_interval
integer | null
time_unit
string | null
entity_type
string | null

Filter by entity type. Valid values: sources, transforms. Comma-separated for multiple (e.g., 'sources,transforms').

entity_id
string | null

Filter by specific entity IDs (comma-separated list).

value_format
string | null

Filter by serialization value format. Valid values: avro, json, json_schema, protobuf, string, bytearray. Case-insensitive.

has_errors
boolean | null

Filter topics by error status. true = only topics with recordErrorTotal > 0.

partial_name
string | null

Filter by topic name (partial match).

Response

Successful Response

timeseries
TopicTimeseriesMetrics · object | null
latest
TopicLatestMetrics · object | null