apps

Get or stream logs

Changed on

Query historical runtime logs, or stream them using Server-Sent Events or JSONL.

When end is specified, returns paginated JSON. When end is omitted, streams logs in real-time using SSE or JSONL.

Requesting Accept: application/json without end will return an error.

get/v2/apps/{app}/logs

Request

  • Base URL
    https://api.deno.com
  • Auth
    HTTP bearer

Path parameters

appstring required

The app ID or slug. App slugs must be 3–32 characters long, may contain only lowercase letters, numbers, and hyphens, cannot contain underscores, must not start or end with a hyphen, must not have consecutive hyphens in positions 3 and 4, and cannot be a reserved slug. App IDs are UUIDs.

Query parameters

startstring date-time required

Start of the time range (ISO 8601)

endstring date-time

End of the time range (ISO 8601). If omitted, logs are streamed in real-time

revision_idstring

Filter logs by revision ID

level'debug' | 'info' | 'warn' | 'error'

Minimum log severity level

querystring

Full-text search query

cursorstring

The pagination cursor

limitinteger

The maximum number of items to return

Response

OK

next_cursorstring nullable required

Cursor for fetching the next page, or null if no more results

Example response

{
  "logs": [
    {
      "timestamp": "2024-01-15T10:30:00.123Z",
      "level": "info",
      "message": "Handling request",
      "revision_id": "r2ysnrrhr352",
      "region": "us-east-1"
    },
    {
      "timestamp": "2024-01-15T10:30:00.456Z",
      "level": "error",
      "message": "Database connection failed",
      "revision_id": "r2ysnrrhr352",
      "region": "us-east-1"
    }
  ],
  "next_cursor": "eyJsYXN0X3RpbWVzdGFtcCI6..."
}

Changes

    • breaking

      the // response's property type changed from no type to string for status

    • info

      for the query request parameter level, the type was generalized from no type to string