Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for Apache Kafka®
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to clusters
    • Stopping and starting clusters
    • Changing cluster settings
    • Working with topics and partitions
    • Managing Kafka accounts
    • Deleting clusters
  • Concepts
    • Relationship between service resources
    • Topics and partitions
    • Brokers
    • Producers and consumers
    • Host classes
    • Network in Managed Service for Apache Kafka®
    • Quotas and limits
    • Storage types
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ClusterService
      • ResourcePresetService
      • TopicService
      • UserService
      • OperationService
    • REST
      • Overview
      • Cluster
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listLogs
        • listOperations
        • move
        • start
        • stop
        • streamLogs
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • Topic
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • Questions and answers
  1. API reference
  2. REST
  3. Cluster
  4. streamLogs

Method streamLogs

  • HTTP request
  • Path parameters
  • Query parameters
  • Response

Same as listLogs but using server-side streaming. Also allows for tail -f semantics.

HTTP request

GET https://mdb.api.cloud.yandex.net/managed-kafka/v1/clusters/{clusterId}:stream_logs

Path parameters

Parameter Description
clusterId Required. ID of the Apache Kafka® cluster. To get the Apache Kafka® cluster ID, make a list request. The maximum string length in characters is 50.

Query parameters

Parameter Description
columnFilter Columns from logs table to get in the response. If no columns are specified, full log records are returned.
fromTime Start timestamp for the logs request. String in RFC3339 text format.
toTime End timestamp for the logs request. If this field is not set, all existing logs will be sent and then the new ones as they appear. In essence it has tail -f semantics. String in RFC3339 text format.
recordToken Record token. Set recordToken to the nextRecordToken returned by a previous streamLogs request to start streaming from next log record. The maximum string length in characters is 100.
filter A filter expression that filters resources listed in the response. The expression must specify: 1. The field name to filter by. Currently filtering can be applied to the hostname field. 2. A conditional operator. Can be either = or != for single values, IN or NOT IN for lists of values. 3. The value. Must be 3-63 characters long and match the regular expression ^[a-z][-a-z0-9]{1,61}[a-z0-9]$. Example of a filter: message.hostname='node1.db.cloud.yandex.net' The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

{
  "record": {
    "timestamp": "string",
    "message": "object"
  },
  "nextRecordToken": "string"
}
Field Description
record object

One of the requested log records.

A single log record.

record.
timestamp
string (date-time)

Log record timestamp.

String in RFC3339 text format.

record.
message
object

Contents of the log record.

nextRecordToken string

This token allows you to continue streaming logs starting from the exact same record.

To continue streaming, specify value of nextRecordToken as value for recordToken parameter in the next StreamLogs request.

This value is interchangeable with nextPageToken from ListLogs method.

In this article:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC