Updated on 2025-09-03 GMT+08:00

Querying a Topic Quota

Function

This API is used to query a topic-level quota task.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Definition:

Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body.

Constraints:

N/A

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 a topic quota

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

Topic quota queried.

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

Status Codes

Status Code

Description

200

Topic quota queried.

Error Codes

See Error Codes.