List Recent Connections Run in API Explorer

GET /v1/monitoring/kafka/connections

List information on recent connections to the cluster.

Query parameters

  • page_size integer(int32)

    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.

  • filter string

    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_OPEN
    • idle_duration > 30s AND total_request_statistics.request_count > 100
    • authentication_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

  • order_by string

    Field-based ordering specification following AIP-132 syntax. Supports multiple fields with asc/desc direction indicators. Examples:

    • idle_duration desc - longest idle connections first
    • open_time desc, total_request_statistics.request_count desc - newest connections first, then most active
    • recent_request_statistics.produce_bytes desc - connections with highest current produce throughput first

    Reference: https://google.aip.dev/132#ordering

Responses

  • 200 application/json

    Recent connections

    Hide response attributes Show response attributes object
    • connections array[object]

      The list of connections matching the request. Note that in addition to open connections, some recently-closed connections may also be included here. If you don't want to include closed connections, set the filter in the request to state = KAFKA_CONNECTION_STATE_OPEN.

      Hide connections attributes Show connections attributes object
      • api_versions object

        This map records, for each Kafka API, the highest version number observed in requests on this connection. It can be useful for understanding which protocol versions a client supports or has negotiated with the broker. Only APIs that were actually used (i.e. at least one request was seen) are included.

        Example: { 0: 11, 1: 13 } means that for API key 0 (Produce), version 11 was the highest seen, and for API key 1 (Fetch), version 13 was the highest seen.

        Reference:

        Hide api_versions attribute Show api_versions attribute object
        • * integer(int32) Additional properties
      • authentication_info object
        Hide authentication_info attributes Show authentication_info attributes object
        • mechanism string

          Values are AUTHENTICATION_MECHANISM_MTLS, AUTHENTICATION_MECHANISM_SASL_SCRAM, AUTHENTICATION_MECHANISM_SASL_OAUTHBEARER, AUTHENTICATION_MECHANISM_SASL_PLAIN, or AUTHENTICATION_MECHANISM_SASL_GSSAPI.

        • state string

          Values are AUTHENTICATION_STATE_UNAUTHENTICATED, AUTHENTICATION_STATE_SUCCESS, or AUTHENTICATION_STATE_FAILURE.

        • user_principal string
      • client_id string

        Client identifier included in every request sent by the Kafka client. This is typically a configurable property (client.id) set by the application when creating a producer or consumer, and is often used for metrics, quotas, and debugging.

      • client_software_name string

        Name of the client library, reported automatically in ApiVersions v3+ requests. This is set by the client implementation and is not typically configurable by applications.

      • client_software_version string

        Version of the client library, reported automatically in ApiVersions v3+ requests. Like client_software_name, this is set by the client and not usually configurable by applications.

      • close_time string(date-time)

        When the connection was closed. This field is set only when the connection state is "closed".

      • group_id string

        Most recent group ID seen in requests sent over this connection. This typically refers to a consumer group, but the Kafka group protocol is more general and may also be used by other types of clients that coordinate membership and assignments through the broker.

      • group_instance_id string

        Most recent group instance ID seen in requests sent over this connection. This is used when static membership is enabled, allowing a specific client instance to retain its group membership across restarts.

      • group_member_id string

        Most recent group member ID seen in requests sent over this connection. This is the unique identifier assigned by the broker to a particular member of the group.

      • idle_duration string
      • in_flight_requests object
        Hide in_flight_requests attributes Show in_flight_requests attributes object
        • has_more_requests boolean

          Whether there are more in-flight requests than those in sampled_in_flight_requests.

        • sampled_in_flight_requests array[object]
          Hide sampled_in_flight_requests attributes Show sampled_in_flight_requests attributes object
          • api_key integer(int32)
          • in_flight_duration string
      • listener_name string

        Name of the Kafka listener that accepted this connection. A listener is a named broker endpoint (for example, "internal", "external", or "sasl_tls"). Each listener defines its network address and enforces its protocol and authentication policy.

      • node_id integer(int32)
      • open_time string(date-time)
      • recent_request_statistics object
        Hide recent_request_statistics attributes Show recent_request_statistics attributes object
        • fetch_bytes string(uint64)

          Sum of bytes fetched.

        • produce_batch_count string(uint64)
        • produce_bytes string(uint64)

          Sum of bytes produced.

        • request_count string(uint64)

          Number of requests the client has made.

      • shard_id integer(int64)
      • source object
        Hide source attributes Show source attributes object
        • ip_address string
        • port integer(int64)
      • state string
        • KAFKA_CONNECTION_STATE_OPEN: The connection is accepting requests.
          • KAFKA_CONNECTION_STATE_ABORTING: The connection is aborting ongoing requests and about to be closed. This is a transient state between open and closed that should rarely be observable under normal circumstances.
          • KAFKA_CONNECTION_STATE_CLOSED: The connection has been closed.

        Values are KAFKA_CONNECTION_STATE_OPEN, KAFKA_CONNECTION_STATE_ABORTING, or KAFKA_CONNECTION_STATE_CLOSED.

      • tls_info object
        Hide tls_info attribute Show tls_info attribute object
        • enabled boolean
      • total_request_statistics object
        Hide total_request_statistics attributes Show total_request_statistics attributes object
        • fetch_bytes string(uint64)

          Sum of bytes fetched.

        • produce_batch_count string(uint64)
        • produce_bytes string(uint64)

          Sum of bytes produced.

        • request_count string(uint64)

          Number of requests the client has made.

      • transactional_id string
      • uid string
    • total_size string(uint64)
  • 401 application/json

    Unauthenticated.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

GET /v1/monitoring/kafka/connections
curl \
 --request GET 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/monitoring/kafka/connections' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "connections": [
    {
      "api_versions": {
        "additionalProperty1": 42,
        "additionalProperty2": 42
      },
      "authentication_info": {
        "mechanism": "AUTHENTICATION_MECHANISM_MTLS",
        "state": "AUTHENTICATION_STATE_UNAUTHENTICATED",
        "user_principal": "string"
      },
      "client_id": "string",
      "client_software_name": "string",
      "client_software_version": "string",
      "close_time": "2025-05-04T09:42:00Z",
      "group_id": "string",
      "group_instance_id": "string",
      "group_member_id": "string",
      "idle_duration": "string",
      "in_flight_requests": {
        "has_more_requests": true,
        "sampled_in_flight_requests": [
          {
            "api_key": 42,
            "in_flight_duration": "string"
          }
        ]
      },
      "listener_name": "string",
      "node_id": 42,
      "open_time": "2025-05-04T09:42:00Z",
      "recent_request_statistics": {
        "fetch_bytes": "string",
        "produce_batch_count": "string",
        "produce_bytes": "string",
        "request_count": "string"
      },
      "shard_id": 42,
      "source": {
        "ip_address": "string",
        "port": 42
      },
      "state": "KAFKA_CONNECTION_STATE_OPEN",
      "tls_info": {
        "enabled": true
      },
      "total_request_statistics": {
        "fetch_bytes": "string",
        "produce_batch_count": "string",
        "produce_bytes": "string",
        "request_count": "string"
      },
      "transactional_id": "string",
      "uid": "string"
    }
  ],
  "total_size": "string"
}
Response examples (401)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}