---
title: "Sample a Saved Report"
method: POST
path: "/print-mail/v1/reports/{id}/samples"
tags: ["Reports"]
---

# Sample a Saved Report

`POST /print-mail/v1/reports/{id}/samples`

Run the query associated with a saved report and get a sample of the results.
This allows getting up to 1000 rows of resutls but the runtime of the query is limited to 30 seconds.
If you need more rows or longer runtime, you should create an export from this report.

## Path parameters

- `id` string, required

## Request body

- SavedReportSampleCreate — Base properties for creating a report sample.
  - `params` string[] — Optional parameters to bind to the SQL query (e.g., for placeholders like ? or $1).
  - `limit` integer — Maximum number of rows to return in the sample.

## Response `201`

A sample of the query results for the specified report.

- ReportSample — Represents the result of a report sample query.
  - `id` string, required — Unique identifier for the sample query result.
  - `report` string, nullable, required — The ID of the report this sample was generated from, or null for ad-hoc samples.
  - `records` ReportRecord[], required — The actual data records returned by the sample query.

## Other responses

- `400` — A sample of the query results for the specified report.
- `401` — A sample of the query results for the specified report.
- `404` — A sample of the query results for the specified report.
- `422` — A sample of the query results for the specified report.
- `429` — A sample of the query results for the specified report.
- `500` — A sample of the query results for the specified report.

---

[API](https://skmtc.net/postgrid/apis/postgrid-print-mail-api.md) · [All operations](https://skmtc.net/postgrid/apis/postgrid-print-mail-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/postgrid/postgrid-print-mail-api/versions/6bb9d268c5d1/schema)
