Skip to main content

Report error codes (mpbx-api reports, mpbx-cdr)

Codes raised by the report routes (W4-RPT-01). Kinds map to HTTP statuses as for the common codes; the ones below that need another status say so. Messages never contain call data. The reader also raises MPBX-CDR-UNREADABLE (cdr.md) and the MPBX-CH-* codes of storage.md. Guide: docs/guides/reports.md.

CodeHTTPMeaningWhat to do
MPBX-REPORT-BAD-PERIOD400from is not before until, or the period is longer than 366 days. A timestamp that is not RFC 3339 is MPBX-INVALID-QUERY with the field named.Send from and until as RFC 3339 with from earlier, at most 366 days apart; omit both for the last 7 days.
MPBX-CDR-EXPORT-UNAVAILABLE501The export format has no encoder installed (a build or a test that installs CSV only).Use format=csv.
MPBX-CDR-EXPORT-TOO-LARGE413The file would be too big for its format: a PDF holds at most 20,000 rows, a worksheet 1,048,575.Use format=csv, or narrow the report.
MPBX-RBAC-FORBIDDEN403The caller has no reports:read grant.Ask for the Supervisor, Department Admin, Manager or Owner role (or a custom role with reports:read).
MPBX-API-NOT-CONFIGURED503The server runs without clickhouse.url: there is no call or queue history to report on.Set [clickhouse] url and restart.
MPBX-REPORT-SCHEDULE-INVALID500A stored report schedule holds a report or format the server does not know (a data error; the schedule is disabled and last_error carries this code). Never raised by the API routes, which validate input.Delete the schedule and create it again; report it if it recurs.