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
Parameter | Description |
---|---|
clusterId | Required. ID of the cluster to stream logs for. To get this ID, make a list request. The maximum string length in characters is 50. |
Query parameters
Parameter | Description |
---|---|
columnFilter | Columns from the logs table to request. If no columns are specified, complete log records are returned. |
serviceType | The log type.
|
fromTime | Start timestamp for the logs request. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
toTime | End timestamp for the logs request. If this field is not set, all existing log records beginning from fromTime will be returned first, and then the new records will be returned as they appear. In essence it has String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
recordToken | Record token that can be used to control logs streaming. Set recordToken to the The maximum string length in characters is 100. |
filter | A filter expression that selects clusters logs listed in the response. The expression must specify:
The maximum string length in characters is 1000. |
Response
HTTP Code: 200 - OK
{
"record": {
"timestamp": "string",
"message": "object"
},
"nextRecordToken": "string"
}
A single log record in the logs stream.
Field | Description |
---|---|
record | object One of the requested log records. A single log record. |
record. timestamp |
string (date-time) Timestamp of the log record. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
record. message |
object Contents of the log record. |
nextRecordToken | string The token that can be used to continue streaming logs starting from the exact same record. To continue streaming, specify value of This value is interchangeable with nextPageToken from listLogs method. |