Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for PostgreSQL
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Managing PostgreSQL hosts
    • Database management
    • How to manage PostgreSQL extensions
    • Managing database users
    • Granting permissions and roles
    • Managing backups
    • Deleting clusters
    • Database migration to the Cloud
    • Creating a logical replica of Amazon RDS for PostgreSQL in Managed Service for PostgreSQL
  • Solutions
    • Creating a PostgreSQL cluster for 1C
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for PostgreSQL
    • Quotas and limits
    • Storage types
    • Backups
    • Assigning roles
    • Replication
    • Supported clients
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • ResourcePresetService
      • UserService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • backup
        • create
        • delete
        • deleteHosts
        • get
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • move
        • rescheduleMaintenance
        • restore
        • start
        • startFailover
        • stop
        • streamLogs
        • update
        • updateHosts
      • Database
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • Questions and answers
    • General questions
    • Questions about PostgreSQL
    • All questions on the same page
  1. API reference
  2. REST
  3. Cluster
  4. listLogs

Method listLogs

  • HTTP request
  • Path parameters
  • Query parameters
  • Response

Retrieves logs for the specified PostgreSQL cluster.

HTTP request

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

Path parameters

Parameter Description
clusterId Required. ID of the PostgreSQL cluster to request logs for. To get the PostgreSQL cluster ID use 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, entire log records are returned.
serviceType Type of the service to request logs about.
  • POSTGRESQL: Logs of PostgreSQL activity.
  • POOLER: Logs of connection pooler activity.
fromTime Start timestamp for the logs request, in RFC3339 text format. String in RFC3339 text format.
toTime End timestamp for the logs request, in RFC3339 text format. String in RFC3339 text format.
pageSize The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
pageToken Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100.
alwaysNextPageToken Always return next_page_token, even if current page is empty.

Response

HTTP Code: 200 - OK

{
  "logs": [
    {
      "timestamp": "string",
      "message": "object"
    }
  ],
  "nextPageToken": "string"
}
Field Description
logs[] object

Requested log records.

logs[].
timestamp
string (date-time)

Log record timestamp in RFC3339 text format.

String in RFC3339 text format.

logs[].
message
object

Contents of the log record.

nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results. This value is interchangeable with next_record_token from StreamLogs method.

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