---
title: "Reads the log, oldest first"
method: GET
path: "/logs/"
tags: ["Server log"]
---

# Reads the log, oldest first

`GET /logs/`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/logs/`
- Auth: none declared. Required headers: `X-Admin-Token`

To follow it, pass the `cursor` of each answer as `since` of the next. Arriving without one reads only the tail, not the whole ring.

## Query parameters

- `since` integer
- `lambda` string
- `level` string
- `client` string
- `limit` integer

## Headers

- `X-Admin-Token` string, required

## Response `200`

The lines, and where to carry on from

- LogResponse: A page of the server's log, and where to carry on from.
  - `Lines` LogEntry[]: The lines, oldest first
    - `Seq` integer: Its sequence: counts up and never repeats, so a reader asks for what came after the last one it saw
    - `At` string, date-time: When it was said
    - `Level` string: `trace`, `debug`, `info`, `warn`, `error` or `critical`
    - `Source` string: Who said it: `Requests` for a request line, `stdout` or `stderr` for what a lambda printed, or the part of the server that spoke
    - `Lambda` string, nullable: The public key of the lambda it belongs to; absent for the platform itself
    - `Text` string: What was said
    - `Detail` string, nullable: The stack trace, where there is one
    - `Client` string, nullable: The address of the caller, where addresses are recorded - with the address a proxy claimed for it, where one did
    - `Agent` string, nullable: What the caller said it was - its user agent
    - `Country` string, nullable: The two letter code of the country the caller's address is registered in, where it is known
    - `Place` string, nullable: The place the caller's address is registered at, where places are looked up
    - `Repeats` integer: How many identical lines in a row this one stands for
    - `Domain` string, nullable: The lambda's own host the request was addressed to; absent for the platform
  - `Cursor` integer: The newest sequence held; pass it as `since` to read what comes after
  - `Missed` integer: Lines that were dropped before the reader got to them, because the ring went round or more matched than were asked for
  - `Capacity` integer: How many lines the ring holds in all
  - `Written` integer: How many lines were written since the server came up
  - `Capturing` boolean: Whether what lambdas print is kept
  - `Addresses` boolean: Whether the address a request came from is recorded
  - `Previous` PreviousRun: The end of the run of the server before this one, where it was not a clean one.
    - `Started` string, date-time: When it started
    - `LastSeen` string, date-time: When it was last seen alive
    - `Minutes` number, double: How long it ran, in minutes
    - `Signalled` boolean: Whether anything asked it to stop. Nothing having asked points at the machine rather than at an operator or a deployment.
    - `Fault` string, nullable: The exception that ended it, where one did
    - `WorkingSet` integer: Its working set when it was last seen, in bytes
    - `Requests` integer: How many requests it had answered
    - `Sockets` integer: How many connections were open when it was last seen

## Other responses

- `204`: A response containing no body
- `401`: The token is missing.
- `403`: The token is wrong.

---

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