get_deployment_runtime_logs

Tail runtime logs for a deployment, with optional substring filtering.

Returns runtime logs for a deployment, what the server writes to stdout/stderr while serving traffic. Defaults to the most recent 100 lines. Read-only.

Pass query to filter the fetched tail to lines containing a substring (case-insensitive), useful for finding specific errors without pulling huge tails.

Parameters

ParameterTypeRequiredDescription
organizationIdstringYesOrganization that owns the deployment. From list_organizations.
deploymentIdstringYesThe deployment whose logs you want. From list_deployments.
linesnumberNoHow many tail lines to fetch (1–5000, default 100).
querystringNoCase-insensitive substring filter, applied to the fetched tail, matches are bounded by lines.

Returns

The log text (ANSI codes stripped) plus lines; with query, also matchedLines and scannedLines.

On this page