Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

Recent runs of a running app, one per request

What the Logs tab shows: the app’s last stored output grouped into invocations, newest first. One invocation is one run of a handler: a request (handler: fetch), a cron run (scheduled), a queue or alarm delivery or other background wake-up (trigger), or output no run claimed (system: a line printed with no request after it, a worker that stopped). The Logs tab shows scheduled runs by default and hides trigger ones. The control plane stores none of it: the lines come from the app’s host (retention in the answer).

Field names follow OpenTelemetry’s semantic conventions where they map: attributes carry http.request.method, url.path, url.scheme, server.address, http.response.status_code and faas.trigger (http, timer or other; a cron run has no HTTP attributes), each exception exception.type, exception.message and exception.stacktrace, each console line severity_number and severity_text. trace_id, span_id and faas.invocation_id will appear when the runtime tags lines with a request id; they are absent today.

Console lines are matched to a request by order (logs_matched_by: order): the host records no request id on a line, so the lines seen since the previous run are attached to the next one. When requests overlap, a line can land under the wrong one.

A host from logs step 2 on stamps every stored line with the time it read it and reports each request’s CPU time (cpu_ms) and a cron run’s expression (attributes["faas.cron"]). A host before that records none: time is null, cpu_ms is null and a cron run has no faas.cron, and the answer is otherwise the same. The host still records no level (severity_number is 0 on a console line; a stack trace has frames only if the runtime printed them).

Time range. from and to keep the runs that finished in that range (epoch milliseconds or an ISO 8601 date-time with a zone; to is optional). On a host with the time window the range is read from the host in full, newest first, up to 10,000 lines or about 10 MiB in all (window.windowed true; window.truncated says when the range holds more and older runs are left out). On a host from before it, the range is cut from the host’s last lines stored lines (1000 at most), so a busy app’s old runs may lie beyond it: window.truncated says so. A run with no time (a line an older host stored) cannot be placed in a range and is left out of it (window.untimed counts them); on a host that records no times (window.times false) a range therefore answers an empty list. window says what the answer covers.

Removed before an invocation is returned, exactly as in GET /v1/apps/{project}/logs: the query string, the http:// scheme (shown https://), and every secret value of 8 characters or more (also URL-encoded, JSON-escaped, base64 and hex), replaced by [redacted]. A message over 16 KiB is cut.

GET/v1/apps/{project}/invocations
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
projectstringrequired

The app's name, unique within the team. 3 to 51 characters (or 1), lowercase letters, digits and dashes, not starting or ending with a dash.

matches ^[a-z0-9](?:[a-z0-9-]{1,49}[a-z0-9])?$
Query parameters
linesinteger

How many of the host's last stored lines to read, 1 to 1000. Default 500, or 1000 when from or to is set. An invocation takes one request line and the lines before it, so the answer has fewer invocations than lines.

min 1 · max 1000 · default: 500
statusstring[]

ok (the run was not an error), error (status_code is ERROR: an exception, a failed outcome, a 5xx, or a cron run that did not answer 2xx), a code such as 404 or a class such as 5xx (requests only). Repeat the parameter or comma-separate.

methodstring[]

HTTP methods (requests only), repeated or comma-separated.

handlerstring[]

Only these kinds of run: fetch, scheduled, trigger, system. Repeat or comma-separate. Default: all.

pathstring

A text the request path must contain (case-insensitive, at most 200 characters). Only requests have a path.

max length 200
searchstring

A text the method, path, a console line or an exception must contain (case-insensitive, at most 200 characters).

max length 200
levelstring

Only runs with a line or exception of at least this level. warn is 13 and up, error 17 and up. An exception counts as an error; a console line has a level only where the host recorded one (none yet), so today this finds runs with an exception.

Allowed:warnerror
fromstring

Only runs that finished at or after this time: epoch milliseconds, or an ISO 8601 date-time with a zone (2026-11-24T08:00:00Z). Needs a host that stamps its lines (window.times).

tostring

Only runs that finished at or before this time, in the same forms as from; must be after from. Default: now.

Responses
200

The invocations, newest first.

projectstringrequired
invocationsInvocation[]required
Show properties
Array of Invocation
idstringrequired

Unique within one answer or stream, not across them.

handlerstringrequired

fetch: a request. scheduled: a cron run. trigger: a queue or alarm delivery or other background wake-up. system: output no run claimed.

Allowed:fetchscheduledtriggersystem
timeinteger | nullrequired

When it finished, ms since the epoch. Null on a line an older host stored (it has no stamp).

outcomestringrequired

The host's outcome: ok, exception, exceededCpu, exceededWallTime, canceled, ...

status_codestringrequired

OpenTelemetry span status: ERROR for an exception, a failed outcome, a 5xx, or a cron or background run the app did not answer with 2xx.

Allowed:UNSETERROR
duration_msnumber | nullrequired

From arrival to reply, so queue wait included. Null for system.

cpu_msnumber | nullrequired

The CPU time the runtime measured for the request, in ms. Null when the host reports none: a host from before logs step 2, a streamed or non-string body, a compatibility date before 2026-11-02.

attributesobjectrequired

OpenTelemetry attributes. A request has http.request.method, url.path (no query), url.scheme (https), server.address, http.response.status_code and faas.trigger: http; a cron run faas.trigger: timer and, when the host reports it, faas.cron (the expression, such as */5 * * * *); a background run faas.trigger: other; system has none. trace_id, span_id and faas.invocation_id will join them.

exceptionsobject[]required
Show properties
Array of object
timeinteger | nullrequired
exception.typestringrequired

The error's name, or WorkerStopped when the host stopped the worker (the message says why).

exception.messagestringrequired
exception.stacktracestring

Present only when frames follow the first line; the runtime prints none for most errors today.

logsobject[]required

What the app printed, oldest first, matched to this run by order.

Show properties
Array of object
timeinteger | nullrequired
severity_numberintegerrequired

OpenTelemetry severity: 0 unspecified (the host records no level yet), 13 warn, 17 error.

severity_textstring
bodystringrequired
sourcestringrequired

host for a line sproutd wrote about the app, app for what the app printed.

Allowed:apphost
logs_matched_bystringrequired

How lines were attached: by order, because the host records no request id on a line.

Allowed:order
logs_droppedintegerrequired

Lines that did not fit (at most 200 or 64 KiB wait for a run) and were dropped, oldest first.

retentionstringrequired

How long the host keeps the app's output, in words.

logs_matched_bystringrequired
Allowed:order
windowobjectrequired
Show properties
sourcestringrequired

What bounds the answer: the last lines stored lines, or a time range cut from them.

Allowed:linestime
linesintegerrequired

The lines asked.

readintegerrequired

Lines the host returned.

frominteger | nullrequired

The range's start as asked, ms since the epoch; null without a range.

tointeger | nullrequired

The range's end as asked; null without one (or with only from).

timesbooleanrequired

Whether the host stamps its stored lines. False for a host from before logs step 2: no range can be answered there.

oldestinteger | nullrequired

The oldest time stamped on a line read, ms since the epoch; null when none has one.

newestinteger | nullrequired

The newest time stamped on a line read.

windowedbooleanrequired

True when the host cut the range itself, so it was read in full up to the page cap. False for a host from before the time window: the range was cut from its last lines lines.

truncatedbooleanrequired

True when older runs of the range exist that this answer does not reach: with windowed, the page cap (10 pages of the host) was hit; otherwise the range starts before oldest and the read hit lines.

untimedintegerrequired

Runs read that have no time (lines an older host stored). A range leaves them out.

totalintegerrequired

Invocations in the window (inside the range, when there is one) before the other filters.

400

A parameter is malformed or out of range (invalid, with its path): a bad status, level, lines, from or to, or a to that is not after from.

One of:
ErrorInvalid
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:invalid
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

404

No such app, build, secret, manifest or claim in this team (another team's resource looks the same).

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
429

Data routes: too many requests in flight or an empty bucket (rate; note retry_after, without _s), or key-rate-limited. Honor Retry-After.

One of:
ErrorKeyRateLimited
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

ErrorRate
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:rate
retry_afterintegerrequired

Seconds to wait; also the Retry-After header.

502

The host agent answered something the Cloud could not handle (reason: agent-error).

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:agent-error
503

The app's host is not reachable (host-unavailable), the app is not running on it yet (app-not-ready), or the audit log could not record the request (audit-unavailable). Retry shortly.

One of:
ErrorHostUnavailable
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:host-unavailable
ErrorAppNotReady
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:app-not-ready
ErrorAuditUnavailable
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:audit-unavailable
Request
curl -X GET 'https://dash.sproutboat.com/v1/apps/my-app/invocations' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "project": "string",
  "invocations": [
    {
      "id": "string",
      "handler": "fetch",
      "time": 0,
      "outcome": "string",
      "status_code": "UNSET",
      "duration_ms": 0,
      "cpu_ms": 0,
      "attributes": {
        "property1": "string",
        "property2": "string"
      },
      "exceptions": [
        {
          "time": 0,
          "exception.type": "string",
          "exception.message": "string",
          "exception.stacktrace": "string"
        }
      ],
      "logs": [
        {
          "time": 0,
          "severity_number": 0,
          "severity_text": "string",
          "body": "string",
          "source": "app"
        }
      ],
      "logs_matched_by": "order",
      "logs_dropped": 0
    }
  ],
  "retention": "string",
  "logs_matched_by": "order",
  "window": {
    "source": "lines",
    "lines": 0,
    "read": 0,
    "from": 0,
    "to": 0,
    "times": true,
    "oldest": 0,
    "newest": 0,
    "windowed": true,
    "truncated": true,
    "untimed": 0
  },
  "total": 0
}