Skip to content
Get startedDashboardSupport

Reports

The reports API lets you run SQL queries against a data lake with all of your PostGrid data. You can use this to run ad-hoc SQL queries or save them as reports. You can bulk export data from these reports to fit all of your reporting needs. Note that the data this API provides may be up to 2 hours behind your current PostGrid environment. Your test and live data lakes are fully segregated, so you’ll need a live API key to run queries against your live data.

You can request access to this to this feature by reaching out to [email protected]

Create Saved Report
client.printMail.reports.create(ReportCreateParams { sqlQuery, description, metadata } body, RequestOptionsoptions?): Report { id, createdAt, live, 5 more }
POST/print-mail/v1/reports
Run Ad-hoc Query
client.printMail.reports.sample(ReportSampleParams { sqlQuery, limit, params } body, RequestOptionsoptions?): ReportSample { id, records, report }
POST/print-mail/v1/reports/samples
Update Report
client.printMail.reports.update(stringid, ReportUpdateParams { description, metadata, sqlQuery } body, RequestOptionsoptions?): Report { id, createdAt, live, 5 more }
POST/print-mail/v1/reports/{id}
List Saved Reports
client.printMail.reports.list(ReportListParams { limit, search, skip } query?, RequestOptionsoptions?): SkipLimit<Report { id, createdAt, live, 5 more } >
GET/print-mail/v1/reports
Retrieve Saved Report
client.printMail.reports.retrieve(stringid, RequestOptionsoptions?): Report { id, createdAt, live, 5 more }
GET/print-mail/v1/reports/{id}
Delete Saved Report
client.printMail.reports.delete(stringid, RequestOptionsoptions?): DeletedResponse { id, deleted }
DELETE/print-mail/v1/reports/{id}
ModelsExpand Collapse

The reports API lets you run SQL queries against a data lake with all of your PostGrid data. You can use this to run ad-hoc SQL queries or save them as reports. You can bulk export data from these reports to fit all of your reporting needs. Note that the data this API provides may be up to 2 hours behind your current PostGrid environment. Your test and live data lakes are fully segregated, so you’ll need a live API key to run queries against your live data.

You can request access to this to this feature by reaching out to [email protected]

Sample a Saved Report
client.printMail.reports.samples.create(stringid, SampleCreateParams { limit, params } body, RequestOptionsoptions?): ReportSample { id, records, report }
POST/print-mail/v1/reports/{id}/samples
ModelsExpand Collapse

The reports API lets you run SQL queries against a data lake with all of your PostGrid data. You can use this to run ad-hoc SQL queries or save them as reports. You can bulk export data from these reports to fit all of your reporting needs. Note that the data this API provides may be up to 2 hours behind your current PostGrid environment. Your test and live data lakes are fully segregated, so you’ll need a live API key to run queries against your live data.

You can request access to this to this feature by reaching out to [email protected]

Create a Report Export
client.printMail.reports.exports.create(stringreportID, ExportCreateParams { description, metadata, params } body, RequestOptionsoptions?): ReportExport { id, createdAt, live, 11 more }
POST/print-mail/v1/reports/{reportID}/exports
Get Report Export
client.printMail.reports.exports.retrieve(stringexportID, ExportRetrieveParams { reportID } params, RequestOptionsoptions?): ReportExport { id, createdAt, live, 11 more }
GET/print-mail/v1/reports/{reportID}/exports/{exportID}
Delete Report Export
client.printMail.reports.exports.delete(stringexportID, ExportDeleteParams { reportID } params, RequestOptionsoptions?): DeletedResponse { id, deleted }
DELETE/print-mail/v1/reports/{reportID}/exports/{exportID}
ModelsExpand Collapse