rds.instances.logs

The PostgreSQL server log from every node, newest first; filter by text, node or severity. Kept 7 days

GET /rds/api/instances/{id}/logsIAM rds:DescribeDBLogFilesReadSensitive read, audited

Request syntax

GET /rds/api/instances/{id}/logs

Path parameters

  • idRequired

    string

    Constraints: 3-64 chars, /^(?!ewdoc-)[a-z0-9-]+$/

Query parameters

  • startOptional

    string

    ISO time the lines start at; a day before end when omitted

  • endOptional

    string

    ISO time the lines end at; now when omitted

  • containsOptional

    string

    Only lines containing this text

    Constraints: max 200 chars

  • nodeOptional

    number

    Only this node, by its ordinal (1 for the first); omitted: every node

    Constraints: integer, 1-99

  • severityOptional

    enum

    Only lines of this severity; omitted: all

    One of: debug, info, notice, log, warning, error, fatal, panic

  • limitOptional

    number

    At most this many lines (default 200)

    Constraints: integer, 1-1000

Response

200 with { start, end, events }: the time range searched and the lines, newest first, each with id, ts, node, severity and message.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • startAlways

    string

    Start of the range searched
  • endAlways

    string

    End of the range searched
  • eventsAlways

    array of object

    Lines, newest first
  • events[].​idAlways

    number

    Line id
  • events[].​tsAlways

    string

    When it was logged
  • events[].​nodeAlways

    string

    Node it came from, e.g. node-1
  • events[].​severityAlways

    string

    Severity in capitals, e.g. ERROR
  • events[].​messageAlways

    string

    The log line

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow rds:DescribeDBLogFiles on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud rds instances logs id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_rds_instances_logs.