Managed Service for MySQL API, REST: Cluster.StreamLogs
Retrieves a log stream for a cluster.
This method is similar to ListLogs, but uses server-side streaming, which allows for the tail -f
command semantics.
HTTP request
GET https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/{clusterId}:stream_logs
Path parameters
Field |
Description |
clusterId |
string Required field. ID of the cluster to stream logs for. To get this ID, make a ClusterService.List request. |
Query parameters
Field |
Description |
columnFilter[] |
string Columns from the logs table to request. |
serviceType |
enum (ServiceType) The log type.
|
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. In essence it has String in RFC3339 To work with values in this field, use the APIs described in the |
recordToken |
string Record token that can be used to control logs streaming. Set |
filter |
string A filter expression that selects clusters logs listed in the response. The expression must specify:
|
Response
HTTP Code: 200 - OK
{
"record": {
"timestamp": "string",
"message": "string"
},
"nextRecordToken": "string"
}
A single log record in the logs stream.
Field |
Description |
record |
One of the requested log records. |
nextRecordToken |
string The token that can be used to continue streaming logs starting from the exact same record. This value is interchangeable with ListClusterLogsResponse.nextPageToken from ClusterService.ListLogs method. |
LogRecord
A single log record.
Field |
Description |
timestamp |
string (date-time) Timestamp of the log record. String in RFC3339 To work with values in this field, use the APIs described in the |
message |
string Contents of the log record. |