Reports

Create a Report Export

Changed on

Create a new export job for a saved report. This runs the report's query asynchronously and generates a downloadable CSV file with the full results. Your queries can run for up to 13 minutes the resulting file can be up to 100mb large.

post/print-mail/v1/reports/{reportID}/exports

Request

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

Path parameters

reportIDstring required

The ID of the report to export.

Request body

paramsstring[]

Optional parameters to bind to the SQL query of the associated report.

descriptionstring

An optional user-friendly description for the export.

metadataobject

Optional key-value metadata associated with the export.

Response

The created ReportExport object, representing the pending job.

idstring required

Unique identifier for the report export.

object'report_export' required

Always report_export.

liveboolean required

Indicates if the export is associated with the live or test environment.

paramsstring[]

Optional parameters to bind to the SQL query of the associated report.

descriptionstring

An optional user-friendly description for the export.

metadataobject

Optional key-value metadata associated with the export.

outputURLstring uri

A signed URL to download the exported data (CSV format). Available when generation is complete and successful.

failureMessagestring

If export generation failed, this contains the error message.

truncatedToBytesinteger

If the output was truncated, indicates the byte limit reached.

sizeInBytesinteger

The size of the generated export file in bytes.

rowCountinteger

The number of rows in the exported data.

createdAtstring date-time required

Timestamp when the export was created.

updatedAtstring date-time required

Timestamp when the export was last updated (e.g., finished generation).

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