View a report run
Request:
GET /api/v2/reports/<report-id>/runs/<run-id>.json
To get the most recent run of the template, use latest as the run ID:
GET /api/v2/reports/<report-id>/runs/latest.json
The response contains the parameters of the run, not the data. To retrieve the data, see View report run data.
Example of response:
{
"report_run": {
"run_id": "8f6a533b-187b-4e99-a0e5-48fe58b53f16",
"report_id": "1c455456-1cca-4223-a366-7bf5a1817778",
"name": "Calls Summary Report by Group",
"description": null,
"run_tenant_id": "9d27913a-b7c3-11ed-9277-1207ffee24c3",
"run_user_id": "649c4a50-172a-498d-acd7-d3b5321a880e",
"created_at": "2024-10-02T10:19:07.574498-07:00",
"period_begin": "2024-08-01T00:00:00-07:00",
"period_end": "2024-10-02T00:00:00-07:00",
"timezone": "America/Los_Angeles",
"filters": [
{"param": "duration", "param2": "", "op": "greater_than", "val": "1:00"}
],
"email_report": false,
"email_report_settings": {
"send_to_emails": [],
"attachment_formats": ["PDF"]
},
"summary_settings": [
{"name": "count_calls", "header": "Calls - Total Calls"},
{"name": "minutes_total", "header": "Calls - Total Minutes"}
],
"chart_settings": {
"chart_style": "bar",
"dimensions": [{"name": "group_name", "header": "Group - Name"}],
"metrics": [
{"name": "count_calls", "header": "Calls - Total Calls"},
{"name": "minutes_total", "header": "Calls - Total Minutes"}
]
},
"column_settings": [
{"name": "group_name", "header": "Group - Name", "text_align": "left"},
{"name": "count_calls", "header": "Calls - Total Calls", "text_align": "right"},
{"name": "minutes_total", "header": "Calls - Total Minutes", "text_align": "right"}
],
"sort_settings": [
{"name": "group_name", "header": "Group - Name", "sort": "ASC"}
],
"format_settings": [],
"started_at": "2024-10-02T10:19:07.614593-07:00",
"completed_at": "2024-10-02T10:19:07.885709-07:00",
"celery_status": "SUCCESS"
}
}
Attributes
| Attribute | Type | Description |
|---|---|---|
run_id |
UUID | Unique ID of the run. |
report_id |
UUID | ID of the report template. |
| name, description | string | Title and description of the report at the time of the run. |
run_tenant_id |
UUID | Tenant of the run. For a global template, the tenant of the user who ran it. Available only to API users of the System tenant in multi-tenant deployments. |
run_user_id |
UUID | User who ran the report, or the owner of the template for a scheduled run. |
created_at |
datetime | When the run was created. |
period_begin, period_end |
datetime | Reporting period of the run. |
| timezone | string | Time zone used for the date filters and the date values in the results. |
| filters | list | Filtering criteria applied to the run. Same format as in the report template. |
email_report, email_report_settings, summary_settings, chart_settings, column_settings, sort_settings, format_settings |
Settings copied from the template at the time of the run. See Report template attributes. | |
started_at |
datetime | When the build started. |
completed_at |
datetime or null | When the build completed. null while the build is in progress. |
celery_status |
string | Build status:
|
Response contains HTTP status code as shown in the following table.
| Response | Description |
|---|---|
| 200 OK | The report run is returned in the response body |
| 403 Forbidden | The request cannot be completed because API user has no permission to view reports |
| 404 Not Found | The report template or the run does not exist, the template has no runs yet (latest), or it is outside the access scope of the API user |