monitoring.logs.filter

Search an app’s log lines, newest first

GET /monitoring/api/logsIAM monitoring:FilterLogEventsRead

start defaults to a day before end, end to now. contains is a case-insensitive substring. limit is at most 1000. Logs are kept 7 days.

Request syntax

GET /monitoring/api/logs

Query parameters

  • resourceTypeOptional

    enum

    What ships the logs: app (default), schedule, function, event_rule, load_balancer or cdn_distribution

    One of: app, schedule, function, event_rule, load_balancer, cdn_distribution

  • resourceIdRequired

    string

    Its id, a uuid. An id the organization does not have answers no lines, not 404

    Constraints: uuid

  • startOptional

    string

    ISO 8601; a day before end when omitted. Must not be after end

  • endOptional

    string

    ISO 8601; now when omitted

  • containsOptional

    string

    Only lines containing this, case-insensitive; up to 200 characters, % and _ literal

  • streamOptional

    string

    Only this stream, exactly (an app’s are <service>/stdout and <service>/stderr); up to 100 characters

  • limitOptional

    number

    Lines to return, newest first, 1–1000 (default 200)

    Constraints: integer

Response

200 with { start, end, events }: the window searched, and up to `limit` lines, newest first, each { id, stream, ts, message }.

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

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 monitoring:FilterLogEvents 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 monitoring logs filter --resource-id 00000000-0000-0000-0000-000000000000

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