---
title: "List Harbor Saved Query Drafts"
method: GET
path: "/api/harbors/{harbor_id}/saved-queries/drafts"
tags: ["Harbors"]
---

# List Harbor Saved Query Drafts

`GET /api/harbors/{harbor_id}/saved-queries/drafts`

## Request

- Base URL: `https://app.polytomic.com`
- URL: `https://app.polytomic.com/api/harbors/{harbor_id}/saved-queries/drafts`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

Lists mutable Harbor saved-query drafts.

Drafts are ordered from newest to oldest and include complete SQL, typed
parameter declarations, and author-supplied validation values. Harbor profile
credentials cannot access this endpoint.

## Path parameters

- `harbor_id` string, uuid, required: Unique identifier of the Harbor

## Query parameters

- `limit` integer: Maximum number of saved-query drafts to return
- `page_token` string: Opaque pagination cursor returned by the previous request

## Headers

- `X-Polytomic-Version` string

## Response `200`

OK

- HarborSavedQueryDraftListEnvelope
  - `data` HarborSavedQueryDraftResponse[], nullable: Saved query drafts on this page
    - `change_note` string, nullable: Optional draft change note
    - `created_at` string, date-time: When the draft was created
    - `created_by` string, uuid, nullable: Actor that created the draft. Null for the system actor.
    - `created_by_type` string: Type of actor that created the draft
    - `description` string: Draft business definition
    - `id` string, uuid: Unique identifier of this mutable draft candidate
    - `name` string: Draft name
    - `owner` string: Draft owner label
    - `parameters` HarborSavedQueryParameter[], nullable: Draft typed parameter declarations
      - `default_value` unknown
      - `name` string, required: Template parameter name referenced as {{start_date}}
      - `required` boolean: When true, rejects explicit null during validation and execution and allows omission only when default_value is present
      - `type` 'string' | 'number' | 'boolean' | 'date' | 'timestamp' | 'uuid', required: Scalar parameter type
    - `saved_query_id` string, uuid: Stable saved-query identifier
    - `sql_template` string: Draft SQL template
    - `updated_at` string, date-time: When the draft was last replaced
    - `updated_by` string, uuid, nullable: Actor that last replaced the draft. Null for the system actor.
    - `updated_by_type` string: Type of actor that last replaced the draft
    - `validation_values` object, nullable: Author-supplied validation inputs
  - `pagination` PaginationDetails
    - `next_page_token` string: Token for fetching the next page of results

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

## Changes

- **2026-10-22** `d80b0fdea14e`: 1 breaking, 1 warning, 1 info
  - the `pagination` response's property type changed from `object` to no type for status `200`
  - removed the optional property `pagination/next_page_token` from the response with the `200` status
  - added `#/components/schemas/PaginationDetails` to the `pagination` response property `allOf` list for the response status `200`
- **2026-09-14** `21557a3c149d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polytomic/apis/polytomic-api/changes/api/harbors/:harbor_id/saved-queries/drafts/get.md)

---

[API](https://skmtc.dev/polytomic/apis/polytomic-api.md) - [All operations](https://skmtc.dev/polytomic/apis/polytomic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polytomic/apis/polytomic-api/revisions/3c88180d2470?raw)
