Run Ad-hoc Query
POST/print-mail/v1/reports/samples
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.
Run Ad-hoc Query
curl https://api.postgrid.com/print-mail/v1/reports/samples \
-H 'Content-Type: application/json' \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" \
-d '{
"sqlQuery": "sqlQuery"
}'{
"id": "sample_abc",
"report": "report_123",
"records": [
{
"id": "order_1"
},
{
"id": "order_2"
}
]
}Returns Examples
{
"id": "sample_abc",
"report": "report_123",
"records": [
{
"id": "order_1"
},
{
"id": "order_2"
}
]
}