---
title: "Gets project's logs"
method: GET
path: "/v1/projects/{ref}/analytics/endpoints/logs.all"
tags: ["Analytics"]
deprecated: true
---

# Gets project's logs

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

> **Deprecated.**

Executes a SQL query on the project's logs.

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.

Note: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer:~:text=logs%20from%20the-,Sources,-drop%2Ddown%3A) for all available sources.

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