Querying Kafka Cluster Metadata

This API is out-of-date and may not be maintained in the future. Please use the API described in Querying Kafka Cluster Metadata.

URI

GET /v1.0/{project_id}/instances/{instance_id}/manage/cluster

The following table describes the parameters.

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID.

instance_id

String

Yes

Instance ID.

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 2 Response parameter

Parameter

Type

Description

cluster

Object of cluster

Cluster basic information. For details, see Table 3.

Table 3 cluster parameters

Parameter

Type

Description

controller

String

Controller ID.

brokers

Array Object of brokers

Broker list. For details, see Table 4.

topics_count

Integer

Total number of topics.

partitions_count

Integer

Total number of partitions.

online_partitions_count

Integer

Number of online partitions.

replicas_count

Integer

Total number of replicas.

isr_replicas_count

Integer

Total number of in-sync replicas (ISRs).

consumers_count

Integer

Total number of consumers.

Table 4 brokers parameters

Parameter

Type

Description

host

String

Broker IP address.

port

Integer

Port number.

broker_id

String

Broker ID.

is_controller

Boolean

Whether the broker is a controller.

version

Boolean

Server version.

register_time

Long

Broker registration time, which is a Unix timestamp.

is_health

Boolean

Whether Kafka brokers can be connected.

Example response

{
    "cluster": {
        "controller": "1",
        "brokers": [
            {
                "broker_id": "1",
                "is_controller": true,
                "version": "1.1.0",
                "register_time": 1569059680711,
                "is_health": true
            },
            {
                "broker_id": "2",
                "is_controller": false,
                "version": "1.1.0",
                "register_time": 1569059684548,
                "is_health": true
            }
        ],
        "topics_count": 4,
        "partitions_count": 13,
        "online_partitions_count": 12,
        "replicas_count": 31,
        "isr_replicas_count": 21,
        "consumers_count": 7
    }
}