---
title: "Api Get Golden Sqls"
method: GET
path: "/api/golden-sqls"
tags: ["Golden SQL"]
---

# Api Get Golden Sqls

`GET /api/golden-sqls`

## Query parameters

- `page` integer
- `page_size` integer
- `order` string
- `ascend` boolean
- `db_connection_id` string

## Response `200`

Successful Response

- GoldenSQLResponse[]
  - `db_connection_id` string, required
  - `prompt_text` string, required
  - `sql` string, required
  - `id` string, required
  - `created_at` string, date-time
  - `metadata` GoldenSQLMetadata
    - `dh_internal` DHGoldenSQLMetadata
      - `prompt_id` string
      - `organization_id` string
      - `source` 'USER_UPLOAD' | 'VERIFIED_QUERY' — An enumeration.
      - `display_id` string

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/dataherald/apis/fastapi.md) · [All operations](https://skmtc.dev/dataherald/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dataherald/fastapi/revisions/e168e98625a8/schema)
