Support

Get application logs

View as Markdown

Returns log entries for the application, newest first.

Full description

Returns log entries for the application, newest first. The v2 endpoint always returns entries in the normalized shape defined by LogEntry: timestamp, level (INFO/WARN/ERROR), source (STDOUT/STDERR), and message. Entries whose raw level or source cannot be mapped to one of the values defined today are dropped, so no entry is returned carrying a value outside LogLevel or LogSource. Both enumerations may gain members in a future version of this specification, so clients must not fail on a value they do not recognise. variant selects the environment (PREVIEW or PUBLISH), matching the variant field used by the restart request body. The service still honours two earlier spellings, target and environment, both deprecated; the precedence is variant > target > environment, and the first one supplied wins while the others are ignored. When none is supplied the environment defaults to PREVIEW. New clients should send variant only. since limits results to entries at or after the given timestamp; defaults to 24 hours ago and cannot exceed 7 days. level filters entries by severity after retrieval.

GET
/apps/{appId}/logs

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT). Generate one from the developer dashboard. Pass as: Authorization: Bearer <token>.

In: header

Path Parameters

appId*string

Application identifier in {PRODUCT}-{id} form. The prefix is the application type in upper case — an upper-case letter followed by any number of upper-case letters, digits, or underscores — then a hyphen, then the identifier. For NODEJS, the suffix is a 10-character nanoid. Example: NODEJS-aBcDeFgHiJ.

Match^[A-Z][A-Z0-9_]*-[A-Za-z0-9_-]+$

Query Parameters

variant?Environment

Environment to retrieve logs from. The canonical parameter; it takes precedence over the deprecated target and environment. Defaults to PREVIEW when none of the three is supplied.

since?string

Return only entries at or after this ISO 8601 timestamp (must include timezone offset). Defaults to 24 hours ago. Cannot exceed 7 days in the past.

Match^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
Length20 <= length <= 64
source?LogSource

Filter logs by source stream. Defaults to all streams.

level?LogLevel

Filter logs by severity level.

pageToken?string

Opaque pagination cursor. Clients should navigate by following links[rel=next].href from the previous response rather than constructing URLs manually; this parameter is documented so that the endpoint's contract is discoverable.

pageSize?integer

Maximum number of log entries to return.

Range1 <= value <= 500
Default100

Header Parameters

traceparent?string

W3C Trace Context identifier for this request. Clients should send a traceparent on every request so the trace can be correlated across services. See https://www.w3.org/TR/trace-context/ for the format.

Match^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/apps/string/logs"
{  "totalItems": 0,  "totalPages": 0,  "links": [    {      "href": "http://example.com",      "rel": "string",      "title": "string",      "targetMediaType": "string",      "targetSchema": null,      "method": "string",      "submissionMediaType": "application/json",      "submissionSchema": null    }  ],  "items": [    {      "timestamp": "stringstringstringst",      "level": "INFO",      "source": "STDOUT",      "message": "string"    }  ]}

Agent & Automation Notes

Scopeshosting.application:read, hosting.application:create, hosting.application:update, hosting.application:delete, hosting.source:write, hosting.deployment:execute, hosting.secret:write, hosting.log:read
Rate limit10–120 req/min per client IP depending on operation
On failureCreate app returns 202 with a job. Poll GET /app-operations/{operationId} until app is ready. Upload source and deployments return 202 with an operation ID. Poll the matching status endpoint until complete. GET operations are safe to retry. Do not resubmit writes without checking current state.

Last updated on

How is this guide?