---
title: "Get instance logs"
method: GET
path: "/preview/v2/instances/{id}/logs"
tags: ["Instances"]
---

# Get instance logs

`GET /preview/v2/instances/{id}/logs`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Retrieve logs for an instance.

## Path parameters

- `id` string, required — A resource path like 'sfc:instance:acme:prod:my-instance' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

## Query parameters

- `seqnum_before` integer
- `seqnum_after` integer
- `realtime_timestamp_before` integer — Unix timestamp.
- `realtime_timestamp_after` integer — Unix timestamp.
- `sort_by` 'seqnum' | '-seqnum'
- `limit` integer

## Response `200`

Log chunks.

- SfcApiInstanceLogsResponse
  - `object` 'list', required
  - `data` SfcApiInstanceLogChunk[], required
    - `timestamp_realtime` integer, required — Unix timestamp.
    - `timestamp_monotonic_secs` integer, required — Monotonic clock seconds.
    - `timestamp_monotonic_nanos` integer, required — Nanosecond component of the monotonic clock.
    - `seqnum` integer, required
    - `data` string, byte, required — Base-64 encoded raw console output.

## Other responses

- `401` — Unauthorized.
- `404` — Instance not found.
- `422` — Validation failed.
- `500` — Internal server error.

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/versions/93dd7661e9bb/schema)
