curl --request POST \
--url https://api.streamkap.com/topics/table_metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entities": [
{
"id": "<string>",
"entity_type": "<string>",
"connector": "<string>",
"topic_ids": [
"<string>"
],
"topic_db_ids": [
"<string>"
]
}
]
}
'import requests
url = "https://api.streamkap.com/topics/table_metrics"
payload = { "entities": [
{
"id": "<string>",
"entity_type": "<string>",
"connector": "<string>",
"topic_ids": ["<string>"],
"topic_db_ids": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entities: [
{
id: '<string>',
entity_type: '<string>',
connector: '<string>',
topic_ids: ['<string>'],
topic_db_ids: ['<string>']
}
]
})
};
fetch('https://api.streamkap.com/topics/table_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/table_metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entities' => [
[
'id' => '<string>',
'entity_type' => '<string>',
'connector' => '<string>',
'topic_ids' => [
'<string>'
],
'topic_db_ids' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.streamkap.com/topics/table_metrics"
payload := strings.NewReader("{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.streamkap.com/topics/table_metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/topics/table_metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Per-topic Kafka metadata for the topics list
Returns per-topic Kafka broker metadata (partition_count, replication_factor, retention_ms) and lastMessageTimestamp, keyed by topic_id.
sources/transforms entities must carry matching topic_ids and topic_db_ids (used for ownership verification); such entities missing topic_db_ids return HTTP 400. destinations are exempt (send topic_db_ids: []) — they are verified against the destination’s topic_map. Topic names must match [a-zA-Z0-9._-]{1,249}; up to 1000 per entity.
All kafka.* fields are nullable — null means the broker did not return metadata for that topic, which is distinct from a legitimate 0. Values may be up to ~60 s stale for partition_count / replication_factor / retention_ms and up to ~10 s stale for lastMessageTimestamp.
curl --request POST \
--url https://api.streamkap.com/topics/table_metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entities": [
{
"id": "<string>",
"entity_type": "<string>",
"connector": "<string>",
"topic_ids": [
"<string>"
],
"topic_db_ids": [
"<string>"
]
}
]
}
'import requests
url = "https://api.streamkap.com/topics/table_metrics"
payload = { "entities": [
{
"id": "<string>",
"entity_type": "<string>",
"connector": "<string>",
"topic_ids": ["<string>"],
"topic_db_ids": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entities: [
{
id: '<string>',
entity_type: '<string>',
connector: '<string>',
topic_ids: ['<string>'],
topic_db_ids: ['<string>']
}
]
})
};
fetch('https://api.streamkap.com/topics/table_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/table_metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entities' => [
[
'id' => '<string>',
'entity_type' => '<string>',
'connector' => '<string>',
'topic_ids' => [
'<string>'
],
'topic_db_ids' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.streamkap.com/topics/table_metrics"
payload := strings.NewReader("{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.streamkap.com/topics/table_metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/topics/table_metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entities\": [\n {\n \"id\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"connector\": \"<string>\",\n \"topic_ids\": [\n \"<string>\"\n ],\n \"topic_db_ids\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
List of entities (sources/destinations/transforms) with their topic IDs. sources/transforms entities that have topic_ids must also include topic_db_ids for ownership verification; otherwise the request returns HTTP 400. destinations are exempt (send topic_db_ids: []) — they are verified against the destination's topic_map.
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?