Skip to main content
GET
/
kafka-clusters
/
{cluster_name}
Get Kafka cluster
curl --request GET \
  --url https://api.example.com/kafka-clusters/{cluster_name}
import requests

url = "https://api.example.com/kafka-clusters/{cluster_name}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/kafka-clusters/{cluster_name}', 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.example.com/kafka-clusters/{cluster_name}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.example.com/kafka-clusters/{cluster_name}"

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

	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.example.com/kafka-clusters/{cluster_name}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/kafka-clusters/{cluster_name}")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "created_at": "<string>",
  "name": "<string>",
  "properties": {},
  "subscriptions": [
    {
      "id": "<string>",
      "options": {},
      "sink": "<string>",
      "source": "<string>"
    }
  ],
  "info": [
    {
      "message": "<string>",
      "code": "<string>"
    }
  ]
}
{
  "message": "<string>",
  "restate_code": "<string>"
}
{
  "message": "<string>",
  "restate_code": "<string>"
}
{
  "message": "<string>",
  "restate_code": "<string>"
}
{
  "message": "<string>",
  "restate_code": "<string>"
}
{
  "message": "<string>",
  "restate_code": "<string>"
}

Path Parameters

cluster_name
string
required

Kafka cluster name

Query Parameters

include_subscriptions
boolean

If true, includes the list of subscriptions using this cluster.

Response

Kafka cluster details

Kafka cluster details with subscriptions.

created_at
string
required

Created at

When the Kafka cluster configuration was created.

name
string<hostname>
required

Cluster Name

Name for the Kafka cluster, used to identify this Kafka cluster configuration in subscriptions. Must be a valid hostname format.

properties
object
required

Properties

Properties for connecting to the kafka cluster.

For a full list of configuration properties, check the librdkafka documentation.

subscriptions
object[]
required

Subscriptions

Subscriptions to this Kafka cluster, returned only when include_subscriptions is enabled.

info
object[]

Info

List of configuration/deprecation information related to this deployment.