---
title: "Get preview results by id."
method: GET
path: "/sql/preview"
tags: ["Preview Operations"]
---

# Get preview results by id.

`GET /sql/preview`

## Request

- Base URL: `https://replace-with-account.api.data.decodable.co/v1alpha2`
- URL: `https://replace-with-account.api.data.decodable.co/v1alpha2/sql/preview`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/decodable/apis/decodable-data-plane/docs/sql/preview/get.ts> (a function with typed inputs; its response is checked against the schema)

Requires a bearer token for getting a data plane preview issued by the control plane API.
Also requires the `decodable-token` header, which is provided by the data plane and signed to prevent tampering.

## Headers

- `decodable-token` string, required

## Response `200`

A preview get response.

- Preview: A preview response.
  - `id` string, required: An opaque ID, created by Decodable, that uniquely identifies a resource.
  - `output_stream_type` 'APPEND' | 'CHANGE'
  - `results` object[]: Result rows from preview.
  - `next_token` string: A token used to fetch the next available results.

## Other responses

- `400`: An invalid request was received.
- `404`: The requested resource does not exist.
- `410`: The requested resource no longer exists.
- `default`: An error has occurred.

---

[API](https://skmtc.dev/decodable/apis/decodable-data-plane.md) - [All operations](https://skmtc.dev/decodable/apis/decodable-data-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/decodable/apis/decodable-data-plane/revisions/4303384f9994?raw)
