Skip to main content
GET
Real-Time Application Logs
string
required
The application ID to retrieve real-time logs. If the application belongs to a workspace, pass its ID in the workspace_id query parameter.
string
If the application belongs to a workspace, the workspace’s ID. Required for workspace members acting on an application they don’t own.
boolean
When true, the stream also carries metrics events with the live CPU, memory and network reading of the application, and next_metrics events with the same reading for the new version during a zero-downtime deploy. Off by default.

Response

The response is streamed as a text event stream (text/event-stream). Each log entry is sent as an event with the following format:
  • Event Type: logs for log messages, next_logs for the output of the new version while a zero-downtime deploy prepares it, system for stream and platform notices (e.g., install_note:started), metrics for the live reading of the application (only with metrics=true), next_metrics for the same reading of the new version while a zero-downtime deploy prepares it (only with metrics=true), heartbeat for keep-alive events with no content.
  • Data: Plain text (not JSON), except in metrics and next_metrics events, whose data is a JSON object. A logs event carries one or more lines separated by newlines, each an ISO 8601 timestamp followed by the log message.
When the connection opens, notices that already happened are sent again before the live stream, each prefixed with the time it happened (<ISO 8601> <notice>). Notices that arrive while you are connected have no prefix. After a deploy, system events can also report what happened to the new version. The notice names the releases involved by their ID, as listed in List Application Releases:
  • deploy_note:failed:<release_id>: the new version stopped right after it started. The log of the failure is available on that release.
  • deploy_note:rollback:<from>:<to>: the platform went back to the previous version automatically, because the new one stopped within 60 seconds of the deploy. <from> is the release that failed and <to> is the one that is running again.
  • deploy_note:discarded:<release_id>:<reason>: on the Enterprise plan, the new version did not become healthy and was discarded; the previous version kept running. <reason> can be absent, and new values may appear:
  • deploy_note:recreated[:<reason>]: the restart or deploy did not use zero downtime, and the application restarted the regular way (stop, then start). Zero downtime only happens when the plan has free memory at least equal to the application’s memory. <reason> can be absent (the restart happened for another reason), and new values may appear:
During a zero-downtime deploy (Enterprise plan), next_logs events carry the output of the new version, installation and build included, while the current version keeps serving and keeps writing to logs. The lines have the same format as logs. When the new version takes over, its output continues as logs. With metrics=true, next_metrics events carry the live reading of the new version, in the same format as metrics, until it takes over or is discarded; metrics keeps describing the version that is serving. Installation and build output are part of the same stream, followed by the application’s own output. Anything your application prints arrives as logs, never as system. Other system notices:

Live metrics

With metrics=true, a metrics event arrives about every 5 seconds while the application is running and the connection is open. Nothing is sent while the application is stopped. Unlike the other events, its data is a JSON object: The rates (net_rx_bps, net_tx_bps) are measured between two consecutive readings.

Error Responses

string
The error code indicating the reason for the failure. Possible values:
  • AUTH_TOKEN_MISSING, API_KEY_INVALID, SESSION_REVOKED: The Authorization header is missing, the API key is invalid, or the dashboard session was revoked (401).
  • API_KEY_IP_DENIED, API_KEY_SCOPE_DENIED: The API key is used from an IP outside its allowlist, or it lacks the scope the route requires (403).
  • ACCESS_DENIED: You are a workspace member without the permission for this action, or you did not send the workspace_id (403).
  • APP_NOT_FOUND: The specified application was not found.
  • FORBIDDEN: The user does not have permission to access the application.
string
A descriptive message providing additional details about the error.
Last modified on November 25, 2026