Update Report
print_mail.reports.update(strid, ReportUpdateParams**kwargs) -> Report
POST/print-mail/v1/reports/{id}
Update an existing saved report definition. You can change the query, description, or metadata.
Update Report
import os
from postgrid import PostGrid
client = PostGrid(
print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"), # This is the default and can be omitted
)
report = client.print_mail.reports.update(
id="id",
description="Recent Orders (Updated)",
)
print(report.id){
"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
{
"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"
}