---
title: "Read a space's runtime logs"
method: GET
path: "/v1/spaces/{spaceId}/logs/runtime"
tags: ["Activity"]
---

# Read a space's runtime logs

`GET /v1/spaces/{spaceId}/logs/runtime`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/logs/runtime`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns log lines written by the space's own code in the requested window — a Zero capsule's queries and mutations, a PHP function, or a Functions worker's handler. Returns empty data for a static space. An empty page with `hasMore: true` means the scan stopped early, not that the log ended. Lines are collected after the response returns, shipped off the box and indexed before they can be read back, so a line a request just wrote will not be here yet. This is not a live stream, and how far behind it runs is the provider's ingest delay rather than a number we control.

## Path parameters

- `spaceId` string, required

## Query parameters

- `limit` integer: Page size.
- `cursor` string: Opaque cursor from the previous page's `nextCursor`.
- `since` union: Start of the log window.
  - string, date-time
  - string
- `until` union: End of the log window.
  - string, date-time
  - string
- `requestId` string: Return only lines emitted while serving this request.
- `handlerName` string: Return only lines from this handler, either a Zero mutation or a Functions handler.

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object[], required
    - `id` string, required
    - `timestamp` string, date-time, required
    - `level` 'debug' | 'info' | 'warn' | 'error', required
    - `requestId` string, nullable, required
    - `versionId` string, nullable, required
    - `handlerName` string, nullable, required
    - `message` string, required
    - `metadata` object, required
  - `pagination` object, required
    - `nextCursor` string, nullable, required: Opaque cursor for the next page; null when there are no more results.
    - `hasMore` boolean, required: Whether another page exists after this one.
  - `warnings` object[]: List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention.
    - `code` string, required: Stable snake_case diagnostic code naming the public contract that produced it.
    - `severity` 'info' | 'warning' | 'error', required: How actionable the diagnostic is.
    - `message` string, required: Human-readable explanation with enough detail to act on.
    - `path` string, nullable: Artifact path the diagnostic points at, for example "_headers:12", when one exists.
    - `provider` 'infra' | 'dns' | 'registrar' | 'runtime', nullable: Upstream system the diagnostic originated from, when not Spacefast itself.
    - `details` object, nullable: Machine-readable context for the diagnostic code.
    - `fix` string, nullable: Concrete, agent-actionable remediation hint, when one can be derived.
    - `retryable` boolean, nullable: Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
