Managed Service for Apache Kafka® API, REST: Cluster.StreamLogs
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
Field |
Description |
clusterId |
string Required field. ID of the Apache Kafka® cluster. To get the Apache Kafka® cluster ID, make a ClusterService.List request. |
Query parameters
Field |
Description |
columnFilter[] |
string Columns from logs table to get in the response. If no columns are specified, full log records are returned. |
fromTime |
string (date-time) Start timestamp for the logs request. String in RFC3339 To work with values in this field, use the APIs described in the |
toTime |
string (date-time) 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. String in RFC3339 To work with values in this field, use the APIs described in the |
recordToken |
string Record token. Set |
filter |
string A filter expression that filters resources listed in the response. The expression must specify:
Example of a filter: |
Response
HTTP Code: 200 - OK
{
"record": {
"timestamp": "string",
"message": "string"
},
"nextRecordToken": "string"
}
Field |
Description |
record |
One of the requested log records. |
nextRecordToken |
string This token allows you to continue streaming logs starting from the exact same record. To continue streaming, specify value of This value is interchangeable with ListClusterLogsResponse.nextPageToken from ListLogs method. |
LogRecord
A single log record.
Field |
Description |
timestamp |
string (date-time) Log record timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
message |
string Contents of the log record. |