API Reference

Reports

3 endpoints· Auth: JWT or API Key
get/api/v1/console/reports/{key} JWT API Key

Run one report over a parameterised window ( …,)

Range parameters are clamped, never rejected: a malformed `from`/`to` degrades to a legal window so a bookmarked URL does not break on a typo. An unknown or unbuilt key is `NOT_FOUND`; a key this role may not open is `FORBIDDEN`.

Capability (any)
view_reportsorview_profitorview_glorview_hq
API key scope
cap:view_reportsorcap:view_profitorcap:view_glorcap:view_hq (the key's owner must also hold the capability)

Path parameters

keyrequired
string
—

Query parameters

Preset
string
`today | yesterday | last7 | last30 | mtd | month | custom`. Unrecognised degrades to `last7`. Supplying Panoptes.Application.DTOs.Requests.Reporting.RunReportRequest.From or Panoptes.Application.DTOs.Requests.Reporting.RunReportRequest.To makes the request custom whatever this says.
From
string (date)
—
To
string (date)
—
FromTime
string
Optional start time, `HH:mm` Baghdad local, on `from`. Order-based reads only; 422 on a bad format (see `TimeOfDayRange`).
ToTime
string
Optional end time, `HH:mm` Baghdad local, on `to`, end minute inclusive. Start must be <= end.
Compare
string
`none | prev_period | prev_year`. Unrecognised degrades to `none`.
Grain
string
`month | week | day` — honoured only by a report that declares grains (today, the labour report). Anything else degrades to the report's natural grain (BR-RPT-9).
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/reports/{key}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/reports/{key}/export JWT API Key

The same run, streamed as a file (,)

`?format=csv` branches to CSV, `?format=pdf[&lang=ar|en]` to the Arabic-first PDF ( … 064); anything else, including nothing, streams the XLSX workbook. A failure still returns the envelope rather than a zero-byte download, so a client that asked for a spreadsheet and hit a refusal gets a code it can act on.

Capability (any)
view_reportsorview_profitorview_glorview_hq
API key scope
cap:view_reportsorcap:view_profitorcap:view_glorcap:view_hq (the key's owner must also hold the capability)

Path parameters

keyrequired
string
—

Query parameters

Format
string
`xlsx | csv | pdf`. An absent or unrecognised value streams the workbook, because XLSX is the default wire format of every export surface (FR-RPT-113).
Lang
string
PDF only: `ar` (default — RTL, Arabic titles and money) or `en`. Ignored for xlsx/csv.
Digits
string
PDF only, Arabic only: `arab` draws Arabic-Indic digits (the reader's dashboard display choice); anything else draws Western digits.
Preset
string
`today | yesterday | last7 | last30 | mtd | month | custom`. Unrecognised degrades to `last7`. Supplying Panoptes.Application.DTOs.Requests.Reporting.RunReportRequest.From or Panoptes.Application.DTOs.Requests.Reporting.RunReportRequest.To makes the request custom whatever this says.
From
string (date)
—
To
string (date)
—
FromTime
string
Optional start time, `HH:mm` Baghdad local, on `from`. Order-based reads only; 422 on a bad format (see `TimeOfDayRange`).
ToTime
string
Optional end time, `HH:mm` Baghdad local, on `to`, end minute inclusive. Start must be <= end.
Compare
string
`none | prev_period | prev_year`. Unrecognised degrades to `none`.
Grain
string
`month | week | day` — honoured only by a report that declares grains (today, the labour report). Anything else degrades to the report's natural grain (BR-RPT-9).
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/reports/{key}/export" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/reports/catalogue JWT API Key

The report registry

Every entry, each flagged with whether this caller may open it and whether they will see its cost columns — so the console mounts affordances from the answer instead of keeping a second copy of the capability matrix. Pending entries are returned and marked, not hidden: "not built yet" and "not permitted" are different answers.

Capability (any)
view_reportsorview_profitorview_glorview_hq
API key scope
cap:view_reportsorcap:view_profitorcap:view_glorcap:view_hq (the key's owner must also hold the capability)

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/reports/catalogue" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Headers

Set credentials in the “Authorize” menu