Updated on 2025-05-21 GMT+08:00

Querying Topic Quotas

Function

This API is used to query topic-level quota tasks.

Calling Method

For details, see Calling APIs.

URI

GET /v2/kafka/{project_id}/instances/{instance_id}/kafka-topic-quota

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Parameter description:

Instance ID. To obtain it, log in to the Kafka console and find the instance ID on the Kafka instance details page.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

project_id

Yes

String

Parameter description:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Parameter description:

Query type.

Constraints:

A query type must start with a letter and can only contain letters, hyphens (-), underscores (_), and digits.

Value range:

The default value is topic.

Default value:

topic

limit

No

String

Parameter description:

Number of quotas displayed on each page.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

offset

No

String

Parameter description:

Number of pages.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

keyword

No

String

Parameter description:

Query keyword.

Constraints:

A query keyword must start with a letter and can only contain letters, hyphens (-), underscores (_), and digits.

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

quotas

Array of KafkaTopicQuota objects

Topic quota configuration.

count

Integer

Number of topic quotas.

Table 4 KafkaTopicQuota

Parameter

Type

Description

topic

String

Topic name.

producer-byte-rate

Integer

Producer rate.

consumer-byte-rate

Integer

Consumer rate.

Example Requests

Querying topic quotas

GET https://{endpoint}/v2/{engine}/{project_d}/instances/{instance_id}/kafka-user-client-quota?type=topic&offset=0&limit=10&keyword=topic-02

Example Responses

Status code: 200

Successful

{
  "quotas" : [ {
    "topic" : "topic-001",
    "producer-byte-rate" : 1024,
    "consumer-byte-rate" : 2048
  } ],
  "count" : 1
}

Status Codes

Status Code

Description

200

Successful

Error Codes

See Error Codes.