---
title: "Gets all project's logs in a single log stream"
method: GET
path: "/v1/projects/{ref}/analytics/endpoints/logs"
tags: ["Analytics"]
---

# Gets all project's logs in a single log stream

`GET /v1/projects/{ref}/analytics/endpoints/logs`

Executes an SQL or LQL query on the project's unified logs stream.

Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.
If both are not provided, only the last 1 minute of logs will be queried.
The timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.

Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.

Note: SQL must be written in **ClickHouse SQL dialect**.

## Path parameters

- `ref` string, required

## Query parameters

- `sql` string
- `iso_timestamp_start` string, date-time
- `iso_timestamp_end` string, date-time

## Response `200`

- AnalyticsResponse
  - `result` unknown[]
    - unknown
  - `error` union
    - string
    - object
      - `code` number, required
      - `errors` object[], required
        - `domain` string, required
        - `location` string, required
        - `locationType` string, required
        - `message` string, required
        - `reason` string, required
      - `message` string, required
      - `status` string, required

## Other responses

- `401` — Unauthorized
- `402` — Usage exceeded. Enable additional usage to continue querying
- `403` — Forbidden action
- `429` — Rate limit exceeded

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
