Kafka clusters
Get Managed Kafka cluster rates
Retrieves a Managed Kafka cluster’s messages in and bytes out per second over the last 5 minutes, each topic’s messages in per second now and over the last hour, and each consumer group’s lag per topic over the range with its derived read rate. Cached for 30 seconds. Returns 400 for other clusters and 409 if the cluster isn’t active.
GET
/
kafka-clusters
/
{uuid}
/
rates
Get Managed Kafka cluster rates
curl --request GET \
--url https://api.artie.com/kafka-clusters/{uuid}/rates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.artie.com/kafka-clusters/{uuid}/rates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.artie.com/kafka-clusters/{uuid}/rates', 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.artie.com/kafka-clusters/{uuid}/rates",
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.artie.com/kafka-clusters/{uuid}/rates"
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.artie.com/kafka-clusters/{uuid}/rates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artie.com/kafka-clusters/{uuid}/rates")
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{
"cluster": {
"bytesInPerSecond": 123,
"bytesInSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"bytesOutPerSecond": 123,
"bytesOutSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"messagesInPerSecond": 123
},
"groups": [
{
"group": "<string>",
"lag": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"readPerSecond": 123,
"topic": "<string>"
}
],
"seriesStepSeconds": 123,
"topics": [
{
"messagesInPerSecond": 123,
"messagesInSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"topic": "<string>"
}
]
}Authorizations
API key passed as a Bearer token in the Authorization header.
Path Parameters
Query Parameters
How far back the topic and consumer group series go, defaults to 1h
Available options:
1h, 6h Was this page helpful?
⌘I
Get Managed Kafka cluster rates
curl --request GET \
--url https://api.artie.com/kafka-clusters/{uuid}/rates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.artie.com/kafka-clusters/{uuid}/rates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.artie.com/kafka-clusters/{uuid}/rates', 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.artie.com/kafka-clusters/{uuid}/rates",
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.artie.com/kafka-clusters/{uuid}/rates"
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.artie.com/kafka-clusters/{uuid}/rates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artie.com/kafka-clusters/{uuid}/rates")
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{
"cluster": {
"bytesInPerSecond": 123,
"bytesInSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"bytesOutPerSecond": 123,
"bytesOutSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"messagesInPerSecond": 123
},
"groups": [
{
"group": "<string>",
"lag": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"readPerSecond": 123,
"topic": "<string>"
}
],
"seriesStepSeconds": 123,
"topics": [
{
"messagesInPerSecond": 123,
"messagesInSeries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
],
"topic": "<string>"
}
]
}
