Reports

Run Ad-hoc Query

Changed on

Run an ad-hoc SQL query against your data lake and get a sample of the results. This is useful for quickly testing queries without saving them as a report. The query execution time and result size are limited.

post/print-mail/v1/reports/samples

Request

  • Base URL
    https://api.postgrid.com
  • URL
    https://api.postgrid.com/print-mail/v1/reports/samples
  • Auth
    API key in header X-API-Key

Request body

paramsstring[]

Optional parameters to bind to the SQL query (e.g., for placeholders like ? or $1).

limitinteger

Maximum number of rows to return in the sample.

Response

A sample of the query results.

idstring required

Unique identifier for the sample query result.

reportstring nullable required

The ID of the report this sample was generated from, or null for ad-hoc samples.

recordsReportRecord[] required

The actual data records returned by the sample query.

Changes

    • warning

      added the new internal_server_error enum value to the / response property for the response status

    • warning

      added the new not_found_error enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded_error enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • info

      added subschema #1 subschema #2 to the response body anyOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response body anyOf list for the response status