---
title: "/api/query-logs"
method: GET
path: "/api/query-logs"
---

# /api/query-logs

`GET /api/query-logs`

## Response `200`

Successful response

- object
  - `data` object[], required
    - `id` integer, required
    - `query` string, required
    - `normalized_query` string
    - `duration` number
    - `connection` string
    - `status` 'completed' | 'failed' | 'slow'
    - `error` string
    - `executed_at` string, required
    - `model` string
    - `method` string
    - `line` number
    - `memory_usage` number
    - `rows_affected` number
    - `transaction_id` string
    - `tags` string
    - `affected_tables` string
    - `indexes_used` string
    - `missing_indexes` string
    - `explain_plan` string
    - `optimization_suggestions` string
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `422` — Validation failed
- `500` — Server error

## Changes

> 37 revisions in range; 2 not diffed, 5 could not be searched.

- **2026-08-16** `57aeb5fbc48c` — 1 info
  - added the required property `data` to the response with the `200` status
- **2026-07-29** `603f23fe9545` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/stacksjs/apis/stacks-api/changes/api/query-logs/get.md)

---

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