Docs
api
Kafka(UKafka)
GetUKafkaTopicInfo

Get topic details - GetUKafkaTopicInfo

Overview

Retrieve detailed information of the specified topic, including Topic properties, message dynamics, and partition status.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUKafkaTopicInfo.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListYes
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
ClusterInstanceIdstringUKafka Cluster IDYes
TopicstringSpecified TopicYes

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
Partitionsobjecttopic partition informationYes
TopicPropertyTopicPropertytopic attributeYes
MessageStateMessageStatetopic Message UpdatesYes

Data Model

TopicProperty

Field NameTypeDescription InformationRequired
NumOfReplicaintNumber of ReplicasNo
NumOfPartitionintNumber of PartitionsNo
NumOfBrokerintNumber of brokersNo
NumOfOccupyBrokerintNumber of brokers occupiedNo
UnderReplicasPerfloatLagging Replica ProportionNo
BrokerSpreadPerfloatCoverage rate of broker for topicNo
BrokerSkewedPerfloatSlope of the broker for the topicNo
PreferredReplicasPerfloatPrimary Replica Occupancy RateNo
SumOfPartitionOffsetintSum of the topic’s offsetNo
SumTopicUsageintSum of disk usage for the topicNo

MessageState

Field NameTypeDescription InformationRequired
LastUpdateTimeintLast update time (timestamp) on topicNo
BytesInPerSecfloatTopic Inflow Message Rate Per MinuteNo
BytesOutPerSecfloattopic Outgoing Message Rate per MinuteNo
MessagesInPerSecfloatTopic Number of Messages Inflow per MinuteNo

Example

Request Example

https://api.dezai.com/?Action=GetUKafkaTopicInfo
&Zone=cn-bj2-02
&ClusterInstanceId=ukafka-asje3q
&Topic=foo
&Region=VjMeLUzs
&ProjectId=AQtYNwBR

Response Example

{
  "Action": "GetUKafkaTopicInfoResponse",
  "MessageState": {
    "BytesInPerSec": 58.74732451878237,
    "BytesOutPerSec": 58.06401734087217,
    "LastUpdateTime": 1537340210000,
    "MessagesInPerSec": 1.2239025941412993
  },
  "Partitions": {
    "0": {
      "isr": [
        3,
        2,
        1
      ],
      "leader": 3,
      "partition": 0,
      "replicas": [
        3,
        2,
        1
      ],
      "topic": "foo",
      "usage": 190224
    },
    "1": {
      "isr": [
        1,
        3,
        2
      ],
      "leader": 1,
      "partition": 1,
      "replicas": [
        1,
        3,
        2
      ],
      "topic": "foo",
      "usage": 190672
    },
    "2": {
      "isr": [
        2,
        1,
        3
      ],
      "leader": 2,
      "partition": 2,
      "replicas": [
        2,
        1,
        3
      ],
      "topic": "foo",
      "usage": 190372
    }
  },
  "RetCode": 0,
  "TopicProperty": {
    "BrokerSkewedPer": 0,
    "BrokerSpreadPer": 1,
    "PreferredReplicasPer": 1,
    "SumOfPartitionOffset": 1773815,
    "SumTopicUsage": 571268,
    "numOfBroker": 3,
    "numOfOccupyBroker": 3,
    "numOfPartition": 3,
    "numOfReplica": 3,
    "underReplicasPer": 0
  }
}