ListKafkaConnections
Returns information about the cluster's Kafka connections, collected and ordered across all brokers.
Body
Required
-
Filter expression to apply to the connection list. Uses a subset of AIP-160 filter syntax supporting:
- Field comparisons (
=,!=,<,>,<=,>=) - Logical AND chaining: condition1 AND condition2
- Nested field access: parent.child = value
- Escape sequences: field = "string with \"quotes\""
- Enum types
- RFC3339 timestamps and ISO-like duration
Limitations (not supported):
- Logical OR chaining
- Parentheses
()for grouping - Map and repeated types
- HAS (:) operator
- Negation (-, NOT)
- Bare literal matching
Example filters:
state = KAFKA_CONNECTION_STATE_OPENidle_duration > 30s AND total_request_statistics.request_count > 100authentication_info.user_principal = "my-producer"recent_request_statistics.produce_bytes > 1000 AND client_software_name = "kgo"open_time >= 2025-09-01T10:22:54Z
Reference: https://google.aip.dev/160
- Field comparisons (
-
Field-based ordering specification following AIP-132 syntax. Supports multiple fields with
asc/descdirection indicators. Examples:idle_duration desc- longest idle connections firstopen_time desc, total_request_statistics.request_count desc- newest connections first, then most activerecent_request_statistics.produce_bytes desc- connections with highest current produce throughput first
Reference: https://google.aip.dev/132#ordering
-
The maximum number of connections to return. If unspecified or 0, a default value may be applied. Note that paging is currently not fully supported, and this field only acts as a limit for the first page of data returned. Subsequent pages of data cannot be requested.
POST
/redpanda.core.admin.v2.ClusterService/ListKafkaConnections
curl \
--request POST 'http://localhost:9644/redpanda.core.admin.v2.ClusterService/ListKafkaConnections' \
--header "Content-Type: application/json" \
--header "Connect-Protocol-Version: 1" \
--header "Connect-Timeout-Ms: 42.0" \
--data '{"filter":"string","orderBy":"string","pageSize":42}'
Request examples
# Headers
Connect-Protocol-Version: 1
Connect-Timeout-Ms: 42.0
# Payload
{
"filter": "string",
"orderBy": "string",
"pageSize": 42
}
Response examples (200)
{
"connections": [
{
"apiVersions": {
"additionalProperty1": 42,
"additionalProperty2": 42
},
"authenticationInfo": {
"mechanism": "AUTHENTICATION_MECHANISM_UNSPECIFIED",
"state": "AUTHENTICATION_STATE_UNSPECIFIED",
"userPrincipal": "string"
},
"clientId": "string",
"clientSoftwareName": "string",
"clientSoftwareVersion": "string",
"closeTime": "2023-01-15T01:30:15.01Z",
"groupId": "string",
"groupInstanceId": "string",
"groupMemberId": "string",
"idleDuration": "string",
"inFlightRequests": {
"hasMoreRequests": true,
"sampledInFlightRequests": [
{
"apiKey": 42,
"inFlightDuration": "string"
}
]
},
"listenerName": "string",
"nodeId": 42,
"openTime": "2023-01-15T01:30:15.01Z",
"recentRequestStatistics": {
"fetchBytes": 42,
"produceBatchCount": 42,
"produceBytes": 42,
"requestCount": 42
},
"shardId": 42,
"source": {
"ipAddress": "string",
"port": 42
},
"state": "KAFKA_CONNECTION_STATE_UNSPECIFIED",
"tlsInfo": {
"enabled": true
},
"totalRequestStatistics": {
"fetchBytes": 42,
"produceBatchCount": 42,
"produceBytes": 42,
"requestCount": 42
},
"transactionalId": "string",
"uid": "string"
}
],
"totalSize": 42
}
Response examples (default)
{
"code": "not_found",
"details": [
{
"debug": {},
"type": "string",
"value": "@file"
}
],
"message": "string"
}