---
title: "Reads the log of a lambda"
method: GET
path: "/lambdas/{privateKey}/logs"
tags: ["Monitoring"]
---

# Reads the log of a lambda

`GET /lambdas/{privateKey}/logs`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/logs`
- Auth: none declared

Its requests, what its code printed, and what the server said while serving it - a handler that threw, a request
that timed out. Oldest first. To follow it, pass the `cursor` of each answer as `since` of the next; `missed` says
how many lines went by unread in between. Requests are logged as warnings when they were answered with a client
error and as errors with a server error. The previews of its features have logs of their own.

## Path parameters

- `privateKey` string, required

## Query parameters

- `since` integer
- `level` string
- `limit` integer

## Response `200`

The lines, and where to carry on from

- OwnerLogResponse: A page of a lambda's log, and where to carry on from.
  - `Lines` OwnerLogEntry[]: 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 the code printed, or the part of the server that spoke
    - `Text` string: What was said
    - `Detail` string, nullable: The stack trace, where there is one
    - `Country` string, nullable: The two letter code of the country the caller's address is registered in, where it is known
    - `Agent` string, nullable: What the caller said it was - its user agent
    - `Repeats` integer: How many identical lines in a row this one stands for; one is itself alone
    - `Domain` string, nullable: The host the request was addressed to: the lambda's subdomain of the hosting domain, or its own domain
  - `Cursor` integer: The newest sequence held; pass it as `since` to read what comes after
  - `Missed` integer: Lines that were dropped before this reader got to them, because the ring went round or more matched than were asked for
  - `Capturing` boolean: Whether what lambdas print is kept at all on this installation

## Other responses

- `204`: A response containing no body
- `404`: No lambda has this editor key. A key that never existed and the key of a deleted lambda are answered alike.

---

[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)
