List Saved Reports
GET/print-mail/v1/reports
Retrieve a list of saved reports for your organization.
Query Parameters
search: optional string
You can supply any string to help narrow down the list of resources. For example, if you pass "New York" (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on StructuredSearchQuery for more details.
List Saved Reports
curl https://api.postgrid.com/print-mail/v1/reports \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY"{
"object": "list",
"limit": 10,
"skip": 0,
"totalCount": 1,
"data": [
{
"id": "report_123",
"object": "report",
"live": false,
"sqlQuery": "SELECT id, status FROM orders WHERE created_at > ?",
"description": "Recent Orders",
"metadata": {
"team": "Sales"
},
"createdAt": "2023-10-27T10:00:00Z",
"updatedAt": "2023-10-27T10:00:00Z"
}
]
}Returns Examples
{
"object": "list",
"limit": 10,
"skip": 0,
"totalCount": 1,
"data": [
{
"id": "report_123",
"object": "report",
"live": false,
"sqlQuery": "SELECT id, status FROM orders WHERE created_at > ?",
"description": "Recent Orders",
"metadata": {
"team": "Sales"
},
"createdAt": "2023-10-27T10:00:00Z",
"updatedAt": "2023-10-27T10:00:00Z"
}
]
}