Managed Service for MySQL API, REST: Cluster.listLogs
Retrieves logs for a cluster.
Alternatively, logs can be streamed using streamLogs.
HTTP request
GET https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/{clusterId}:logs
Path parameters
Parameter | Description |
---|---|
clusterId | Required. ID of the cluster to request 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. The logs in the response will be within fromTime to toTime range. 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. The logs in the response will be within fromTime to toTime range. 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). |
pageSize | The maximum number of results per page to return. If the number of available results is larger than pageSize, the API returns a nextPageToken that can be used to get the next page of results in the subsequent listLogs requests. Acceptable values are 0 to 1000, inclusive. |
pageToken | Page token that can be used to iterate through multiple pages of results. To get the next page of results, set pageToken to the nextPageToken returned by the previous listLogs request. The maximum string length in characters is 100. |
alwaysNextPageToken | Option that controls the behavior of result pagination. If it is set to |
Response
HTTP Code: 200 - OK
{
"logs": [
{
"timestamp": "string",
"message": "object"
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
logs[] | object Requested log records. |
logs[]. 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). |
logs[]. message |
object Contents of the log record. |
nextPageToken | string The token that can be used to get the next page of results. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken in the subsequent listLogs request to iterate through multiple pages of results. Each of the subsequent listLogs requests should use the nextPageToken value returned by the previous request to continue paging through the results. This value is interchangeable with |